para-cli 1.20.2 → 1.20.3

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 (3) hide show
  1. package/index.js +3 -3
  2. package/package.json +7 -7
  3. package/para-cli.js +2 -2
package/index.js CHANGED
@@ -59,9 +59,9 @@ export function setup(config) {
59
59
  rl.question(cyan.bold('Para Endpoint: '), function (endpoint) {
60
60
  var access = (accessKey || config.get('accessKey') || "app:para").trim();
61
61
  var secret = (secretKey || config.get('secretKey')).trim();
62
- var endpoint = (endpoint || config.get('endpoint')).trim();
62
+ var endpoint = (endpoint || defaultConfig.endpoint).trim();
63
63
  newJWT(access, secret, endpoint, config);
64
- var pc = new ParaClient(access, secret, parseEndpoint(endpoint || defaultConfig.endpoint));
64
+ var pc = new ParaClient(access, secret, parseEndpoint(endpoint));
65
65
  ping(pc, config);
66
66
  if (access === 'app:para') {
67
67
  listApps(config, {}, access, function () {
@@ -630,7 +630,7 @@ export function parseEndpoint(endpoint) {
630
630
  return x;
631
631
  }
632
632
  } catch (e) {
633
- fail('Invalid Para endpoint:', endpoint);
633
+ fail('Invalid Para endpoint: ' + endpoint, e);
634
634
  }
635
635
  return { endpoint: endpoint };
636
636
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "para-cli",
3
- "version": "1.20.2",
3
+ "version": "1.20.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Command-line tool for Para backend servers",
6
6
  "homepage": "https://paraio.org",
@@ -24,7 +24,7 @@
24
24
  "api"
25
25
  ],
26
26
  "devDependencies": {
27
- "eslint": "^8.32.0"
27
+ "eslint": "^8.39.0"
28
28
  },
29
29
  "repository": "Erudika/para-cli",
30
30
  "dependencies": {
@@ -32,15 +32,15 @@
32
32
  "chalk": "^5.2.0",
33
33
  "conf": "^11.0.1",
34
34
  "exit": "^0.1.2",
35
- "figlet": "^1.5.2",
35
+ "figlet": "^1.6.0",
36
36
  "get-stdin": "^9.0.0",
37
- "globby": "^13.1.3",
38
- "htmlparser2": "^8.0.1",
37
+ "globby": "^13.1.4",
38
+ "htmlparser2": "^8.0.2",
39
39
  "jsonwebtoken": "^9.0.0",
40
- "meow": "^11.0.0",
40
+ "meow": "^12.0.0",
41
41
  "mime-types": "^2.1.35",
42
42
  "para-client-js": "^1.38.1",
43
- "resolve": "^1.22.1",
43
+ "resolve": "^1.22.2",
44
44
  "striptags": "^3.2.0",
45
45
  "update-notifier": "^6.0.2",
46
46
  "yargs-parser": "^21.1.1"
package/para-cli.js CHANGED
@@ -118,12 +118,12 @@ var selectedApp = config.get('selectedApp');
118
118
  if (!flags.accessKey && !flags.secretKey && selectedApp && selectedApp.accessKey && selectedApp.accessKey.indexOf("app:") === 0) {
119
119
  accessKey = selectedApp.accessKey;
120
120
  secretKey = selectedApp.secretKey;
121
- endpoint = selectedApp.endpoint;
121
+ endpoint = selectedApp.endpoint || endpoint;
122
122
  }
123
123
 
124
124
  if (!input[0]) {
125
125
  console.log(help);
126
- } else if (!accessKey || !secretKey) {
126
+ } else if ((!accessKey || !secretKey) && input[0] !== 'setup') {
127
127
  console.error(red('Command ' + input[0] + ' failed! Blank credentials, running setup first...'));
128
128
  console.log("Please enter the access key and secret key for the root app 'app:para' first.");
129
129
  process.exitCode = 1;