ispbills-icli 1.0.0 → 1.0.1

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/package.json +10 -3
  2. package/src/auth.js +4 -1
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "ispbills-icli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "iCli — IspBills AI network engineer in your terminal",
5
- "keywords": ["ispbills", "network", "isp", "ai", "cli", "noc"],
5
+ "keywords": [
6
+ "ispbills",
7
+ "network",
8
+ "isp",
9
+ "ai",
10
+ "cli",
11
+ "noc"
12
+ ],
6
13
  "license": "MIT",
7
14
  "bin": {
8
- "icli": "./bin/icli.js"
15
+ "icli": "bin/icli.js"
9
16
  },
10
17
  "engines": {
11
18
  "node": ">=18.0.0"
package/src/auth.js CHANGED
@@ -7,11 +7,14 @@ export async function loginFlow(existingUrl = '') {
7
7
 
8
8
  console.log('\nšŸ”Œ iCli — IspBills AI terminal\n');
9
9
 
10
+ const DEFAULT_URL = 'https://app.ispbills.com';
10
11
  let url = existingUrl;
11
12
  if (!url) {
12
- url = (await rl.question('IspBills instance URL (e.g. https://app.myisp.com): ')).trim();
13
+ const input_url = (await rl.question(`IspBills instance URL [${DEFAULT_URL}]: `)).trim();
14
+ url = input_url || DEFAULT_URL;
13
15
  }
14
16
  url = url.replace(/\/$/, '');
17
+ if (!/^https?:\/\//i.test(url)) url = 'https://' + url;
15
18
 
16
19
  const email = (await rl.question('Email: ')).trim();
17
20
  const password = await rl.question('Password: ');