cloudron 5.7.0 → 5.8.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.7.0",
3
+ "version": "5.8.0",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
package/src/actions.js CHANGED
@@ -609,27 +609,27 @@ async function install(localOptions, cmd) {
609
609
  }
610
610
 
611
611
  // port bindings
612
- let portBindings = {};
612
+ let ports = {};
613
613
  if (options.portBindings) {
614
614
  // ask the user for port values if the ports are different in the app and the manifest
615
615
  if (typeof options.portBindings === 'string') {
616
- portBindings = { };
616
+ ports = { };
617
617
  options.portBindings.split(',').forEach(function (kv) {
618
618
  const tmp = kv.split('=');
619
619
  if (isNaN(parseInt(tmp[1], 10))) return; // disable the port
620
- portBindings[tmp[0]] = parseInt(tmp[1], 10);
620
+ ports[tmp[0]] = parseInt(tmp[1], 10);
621
621
  });
622
622
  } else {
623
- portBindings = queryPortBindings(null /* existing app */, manifest);
623
+ ports = queryPortBindings(null /* existing app */, manifest);
624
624
  }
625
625
  } else { // just put in defaults
626
626
  const allPorts = _.extend({}, manifest.tcpPorts, manifest.udpPorts);
627
627
  for (const portName in allPorts) {
628
- portBindings[portName] = allPorts[portName].defaultValue;
628
+ ports[portName] = allPorts[portName].defaultValue;
629
629
  }
630
630
  }
631
631
 
632
- for (const binding in portBindings) console.log(`Port ${binding}: ${portBindings[binding]}`);
632
+ for (const port in ports) console.log(`Port ${port}: ${ports[port]}`);
633
633
 
634
634
  const data = {
635
635
  appStoreId: options.appstoreId || '', // note case change
@@ -639,7 +639,7 @@ async function install(localOptions, cmd) {
639
639
  domain: domainObject.domain,
640
640
  secondaryDomains,
641
641
  aliasDomains,
642
- portBindings,
642
+ ports,
643
643
  accessRestriction: null
644
644
  };
645
645
 
@@ -711,7 +711,7 @@ async function configure(localOptions, cmd) {
711
711
  location: domainObject.subdomain, // LEGACY
712
712
  subdomain: domainObject.subdomain,
713
713
  domain: domainObject.domain,
714
- portBindings: app.portBindings,
714
+ ports: app.portBindings,
715
715
  secondaryDomains,
716
716
  aliasDomains
717
717
  };
@@ -734,24 +734,24 @@ async function configure(localOptions, cmd) {
734
734
 
735
735
  // port bindings
736
736
  if (options.portBindings) {
737
- let portBindings = app.portBindings;
737
+ let ports = app.portBindings;
738
738
  // ask the user for port values if the ports are different in the app and the manifest
739
739
  if (typeof options.portBindings === 'string') {
740
- portBindings = {};
740
+ ports = {};
741
741
  options.portBindings.split(',').forEach(function (kv) {
742
742
  const tmp = kv.split('=');
743
743
  if (isNaN(parseInt(tmp[1], 10))) return; // disable the port
744
- portBindings[tmp[0]] = parseInt(tmp[1], 10);
744
+ ports[tmp[0]] = parseInt(tmp[1], 10);
745
745
  });
746
746
  } else {
747
- portBindings = queryPortBindings(app, app.manifest);
747
+ ports = queryPortBindings(app, app.manifest);
748
748
  }
749
749
 
750
- for (const binding in portBindings) {
751
- console.log('%s: %s', binding, portBindings[binding]);
750
+ for (const port in ports) {
751
+ console.log('%s: %s', port, ports[port]);
752
752
  }
753
753
 
754
- data.portBindings = portBindings;
754
+ data.ports = portBindings;
755
755
  }
756
756
 
757
757
  const request = createRequest('POST', `/api/v1/apps/${app.id}/configure/location`, options);
@@ -1258,7 +1258,7 @@ async function clone(localOptions, cmd) {
1258
1258
 
1259
1259
  const location = options.location || readlineSync.question('Cloned app location: ', {});
1260
1260
  const secondaryDomains = await querySecondaryDomains(app, app.manifest, options);
1261
- const portBindings = queryPortBindings(app, app.manifest);
1261
+ const ports = queryPortBindings(app, app.manifest);
1262
1262
  const backupId = options.backup;
1263
1263
 
1264
1264
  const domainObject = await selectDomain(location, options);
@@ -1268,7 +1268,7 @@ async function clone(localOptions, cmd) {
1268
1268
  subdomain: domainObject.subdomain,
1269
1269
  domain: domainObject.domain,
1270
1270
  secondaryDomains,
1271
- portBindings
1271
+ ports
1272
1272
  };
1273
1273
  const request = createRequest('POST', `/api/v1/apps/${app.id}/clone`, options);
1274
1274
  const response = await request.send(data);
@@ -280,9 +280,12 @@ async function decryptDir(inDir, outDir, options) {
280
280
  }
281
281
 
282
282
  const encryptedFilePath = path.join(cur, entry.name);
283
+
283
284
  const { error, decryptedFilePath } = decryptFilePath(encryptedFilePath, encryption);
284
285
  if (error) throw error;
285
286
 
287
+ console.log(`Decrypting ${decryptedFilePath}`);
288
+
286
289
  const infile = path.join(inDirAbs, cur, entry.name);
287
290
  const inStream = fs.createReadStream(infile);
288
291
  fs.mkdirSync(path.dirname(path.join(outDirAbs, decryptedFilePath)), { recursive: true });