cloudron 5.16.1 → 6.0.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/CHANGELOG.md CHANGED
@@ -42,3 +42,6 @@
42
42
  [5.16.0]
43
43
  * build: output the selected Dockerfile name
44
44
 
45
+ [5.16.1]
46
+ * Remove the update checker
47
+
package/bin/cloudron CHANGED
@@ -39,6 +39,7 @@ const backupCommand = program.command('backup')
39
39
 
40
40
  backupCommand.command('create')
41
41
  .description('Create new app backup')
42
+ .option('--site <siteid>', 'App id')
42
43
  .option('--app <id>', 'App id')
43
44
  .action(actions.backupCreate);
44
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "5.16.1",
3
+ "version": "6.0.0",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
@@ -19,23 +19,23 @@
19
19
  "dependencies": {
20
20
  "@cloudron/manifest-format": "^5.28.0",
21
21
  "@cloudron/superagent": "^1.0.0",
22
- "commander": "^13.1.0",
23
- "debug": "^4.4.1",
22
+ "commander": "^14.0.1",
23
+ "debug": "^4.4.3",
24
24
  "easy-table": "^1.2.0",
25
25
  "ejs": "^3.1.10",
26
- "eventsource": "^3.0.7",
26
+ "eventsource": "^4.0.0",
27
27
  "micromatch": "^4.0.8",
28
28
  "open": "^10.2.0",
29
29
  "safetydance": "^2.5.1",
30
- "tar-fs": "^3.1.0"
30
+ "tar-fs": "^3.1.1"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">= 18.x.x"
34
34
  },
35
35
  "devDependencies": {
36
- "@eslint/js": "^9.32.0",
37
- "eslint": "^9.32.0",
36
+ "@eslint/js": "^9.37.0",
37
+ "eslint": "^9.37.0",
38
38
  "expect.js": "^0.3.1",
39
- "mocha": "^11.7.1"
39
+ "mocha": "^11.7.4"
40
40
  }
41
41
  }
package/src/actions.js CHANGED
@@ -384,7 +384,7 @@ async function login(adminFqdn, localOptions, cmd) {
384
384
  console.log('Existing token still valid.');
385
385
  } else {
386
386
  token = null;
387
- console.log(`Existing token possibly expired: ${requestError(response)}`);
387
+ console.log(requestError(response));
388
388
  }
389
389
  }
390
390
 
@@ -1107,8 +1107,17 @@ async function backupCreate(localOptions, cmd) {
1107
1107
  const app = await getApp(options);
1108
1108
  if (!app) return exit(NO_APP_FOUND_ERROR_STRING);
1109
1109
 
1110
+ let backupSiteId = options.site || null;
1111
+ if (!backupSiteId) {
1112
+ const response = await createRequest('GET', `/api/v1/backup_sites`, options);
1113
+ if (response.status !== 200) throw new Error(`Failed to list backup sites: ${requestError(response)}`);
1114
+ if (response.body.backupSites.length === 0) throw new Error(`No backup sites`);
1115
+ backupSiteId = response.body.backupSites[0].id;
1116
+ if (response.body.backupSites.length > 1) console.warn(`More than one backup site. Picking ${response.body.backupSites[0].name}`);
1117
+ }
1118
+
1110
1119
  const request = createRequest('POST', `/api/v1/apps/${app.id}/backup`, options);
1111
- const response = await request.send({});
1120
+ const response = await request.send({ backupSiteId });
1112
1121
  if (response.status !== 202) return exit(`Failed to start backup: ${requestError(response)}`);
1113
1122
 
1114
1123
  // FIXME: this should be waitForHealthCheck but the box code incorrectly modifies the installationState