cloudron 5.3.3 → 5.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "5.3.3",
3
+ "version": "5.4.0",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
package/src/actions.js CHANGED
@@ -343,7 +343,7 @@ async function authenticate(adminFqdn, username, password, options) {
343
343
  const { rejectUnauthorized, askForTotpToken } = options;
344
344
  if (askForTotpToken) totpToken = readlineSync.question('2FA Token: ', {});
345
345
 
346
- const request = superagent.post(`https://${adminFqdn}/api/v1/cloudron/login`)
346
+ const request = superagent.post(`https://${adminFqdn}/api/v1/auth/login`)
347
347
  .timeout(60000)
348
348
  .send({ username, password, totpToken })
349
349
  .ok(() => true)
@@ -948,7 +948,7 @@ async function logs(localOptions, cmd) {
948
948
 
949
949
  if (typeof options.system === 'boolean' && options.system) {
950
950
  // box
951
- apiPath = `https://${adminFqdn}/api/v1/cloudron/${ tail ? 'logstream' : 'logs' }/box`;
951
+ apiPath = `https://${adminFqdn}/api/v1/system/${ tail ? 'logstream' : 'logs' }/box`;
952
952
  } else if (typeof options.system === 'string') {
953
953
  // services
954
954
  apiPath = `https://${adminFqdn}/api/v1/services/${options.system}/${ tail ? 'logstream' : 'logs' }`;
@@ -94,11 +94,13 @@ function followBuildLog(buildId, raw, callback) {
94
94
  var data = safe.JSON.parse(e.data);
95
95
  if (!data) return; // this is a bug in docker or our build server
96
96
 
97
- if (data.status) { // push log
97
+ if (data.status) { // image push log
98
98
  if (data.id && data.id === prevId) {
99
- // the code below does not work os x if the line wraps, maybe we should clip the text to window size?
100
- process.stdout.clearLine();
101
- process.stdout.cursorTo(0);
99
+ if (process.stdout.isTTY) {
100
+ // the code below does not work os x if the line wraps, maybe we should clip the text to window size?
101
+ process.stdout.clearLine();
102
+ process.stdout.cursorTo(0);
103
+ }
102
104
  } else if (prevWasStatus) {
103
105
  process.stdout.write('\n');
104
106
  }