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.
Files changed (2) hide show
  1. package/dist/index.js +19 -22
  2. 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
- if (err.message?.includes("No CLI gateway token found")) {
840
- printWarning("This instance was provisioned before CLI support \u2014 no gateway token on file.");
841
- console.log(dim(" You can grab your token and domain from the instance dashboard.\n"));
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() });
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starkbot-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for Starkbot — login, provision, and chat with your bot from the terminal",
5
5
  "type": "module",
6
6
  "bin": {