cloudron 5.2.2 → 5.3.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/bin/cloudron CHANGED
@@ -116,6 +116,7 @@ program.command('configure')
116
116
  .option('-p, --port-bindings [PORT=port,...]', 'Query port bindings')
117
117
  .option('-l, --location <location>', 'Location')
118
118
  .option('-s, --secondary-domains [DOMAIN=domain,...]', 'Query/Set secondary domains')
119
+ .option('-a, --alias-domains [domain,...]', 'Alias domains')
119
120
  .action(actions.configure);
120
121
 
121
122
  program.command('debug [cmd...]')
@@ -195,7 +196,8 @@ program.command('install')
195
196
  .option('--no-wait', 'Wait for healthcheck to succeed [false]')
196
197
  .option('-p, --port-bindings [PORT=port,...]', 'Query/Set port bindings')
197
198
  .option('-l, --location <domain>', 'Subdomain or full domain')
198
- .option('-s, --secondary-domains [DOMAIN=domain,...]', 'Query/Set secondary domains')
199
+ .option('-s, --secondary-domains [DOMAIN=domain,...]', 'Set secondary domains')
200
+ .option('-a, --alias-domains [domain,...]', 'Alias domains')
199
201
  .option('--appstore-id <appid[@version]>', 'Use app from the store')
200
202
  .option('--no-sso', 'Disable Cloudron SSO [false]')
201
203
  .option('--debug [cmd]', 'Enable debug mode')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "5.2.2",
3
+ "version": "5.3.0",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
package/src/actions.js CHANGED
@@ -596,6 +596,13 @@ async function install(localOptions, cmd) {
596
596
 
597
597
  for (const binding in secondaryDomains) console.log(`Secondary domain ${binding}: ${secondaryDomains[binding].subdomain}.${secondaryDomains[binding].domain}`);
598
598
 
599
+ let aliasDomains = [];
600
+ if (options.aliasDomains) {
601
+ for (const aliasDomain of options.aliasDomains.split(',')) {
602
+ aliasDomains.push(await selectDomain(aliasDomain, options));
603
+ }
604
+ }
605
+
599
606
  // port bindings
600
607
  let portBindings = {};
601
608
  if (options.portBindings) {
@@ -626,6 +633,7 @@ async function install(localOptions, cmd) {
626
633
  subdomain: domainObject.subdomain,
627
634
  domain: domainObject.domain,
628
635
  secondaryDomains,
636
+ aliasDomains,
629
637
  portBindings,
630
638
  accessRestriction: null
631
639
  };
@@ -672,7 +680,7 @@ async function configure(localOptions, cmd) {
672
680
  if (!app) return exit(NO_APP_FOUND_ERROR_STRING);
673
681
 
674
682
  if (!options.location) options.location = readlineSync.question(`Enter new location (default: ${app.fqdn}): `, { });
675
- let location = options.location || app.location;
683
+ let location = options.location || app.subdomain;
676
684
 
677
685
  const domainObject = await selectDomain(location, options);
678
686
 
@@ -686,12 +694,21 @@ async function configure(localOptions, cmd) {
686
694
  });
687
695
  }
688
696
 
697
+ let aliasDomains = app.aliasDomains;
698
+ if (options.aliasDomains) {
699
+ aliasDomains = [];
700
+ for (const aliasDomain of options.aliasDomains.split(',')) {
701
+ aliasDomains.push(await selectDomain(aliasDomain, options));
702
+ }
703
+ }
704
+
689
705
  const data = {
690
706
  location: domainObject.subdomain, // LEGACY
691
707
  subdomain: domainObject.subdomain,
692
708
  domain: domainObject.domain,
693
709
  portBindings: app.portBindings,
694
- secondaryDomains
710
+ secondaryDomains,
711
+ aliasDomains
695
712
  };
696
713
 
697
714
  // secondary domains