@stacksjs/buddy 0.70.195 → 0.70.196

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.
@@ -75,6 +75,7 @@ export declare function loadTsCloudDeployApi(): Promise<typeof import('@stacksjs
75
75
  * gateway's route table (which proxies to 127.0.0.1:port on-box), so its
76
76
  * port declaration is left alone.
77
77
  */
78
+ export declare function shouldInjectManagementDashboard(tsCloudConfig: any): boolean;
78
79
  export declare function scrubLoopbackSitePortsForFirewall(tsCloudConfig: any): any;
79
80
  /**
80
81
  * Mail tenancy is an explicit deployment capability. The merged Stacks config
@@ -564,6 +564,9 @@ export async function loadTsCloudDeployApi() {
564
564
  throw Error(`TS_CLOUD_MODULE points to a missing module: ${modulePath}`);
565
565
  return import(pathToFileURL(modulePath).href);
566
566
  }
567
+ export function shouldInjectManagementDashboard(tsCloudConfig) {
568
+ return !tsCloudConfig.cloud?.attachTo;
569
+ }
567
570
  export function scrubLoopbackSitePortsForFirewall(tsCloudConfig) {
568
571
  const sites = tsCloudConfig?.sites;
569
572
  if (!sites)
@@ -671,11 +674,13 @@ async function runHetznerDeploy(args) {
671
674
  log.info(`Location: ${tsCloudConfig.hetzner?.location || process.env.HCLOUD_LOCATION || "fsn1"}`);
672
675
  log.info(`Size: ${tsCloudConfig.infrastructure?.compute?.size || "small"}`);
673
676
  try {
674
- if (typeof ensureManagementDashboard === "function")
677
+ if (shouldInjectManagementDashboard(tsCloudConfig) && typeof ensureManagementDashboard === "function")
675
678
  ensureManagementDashboard(tsCloudConfig, {
676
679
  cwd: process.cwd(),
677
680
  logger: { info: (m) => log.info(m), warn: (m) => log.warn(m) }
678
681
  });
682
+ else if (tsCloudConfig.cloud?.attachTo)
683
+ log.info(`Management dashboard: using the '${tsCloudConfig.cloud.attachTo}' server owner's dashboard`);
679
684
  } catch (err) {
680
685
  log.warn(`Management dashboard injection skipped: ${getErrorMessage(err)}`);
681
686
  }
@@ -789,7 +794,7 @@ async function runHetznerDeploy(args) {
789
794
  log.info(onlySite ? `Shipping site '${onlySite}' to the server...` : "Shipping release to the server...");
790
795
  const deployConfig = onlySite ? { ...tsCloudConfig, sites: { [onlySite]: sitesWithResolvedEnv[onlySite] } } : { ...tsCloudConfig, sites: sitesWithResolvedEnv }, ok = await deployAllComputeSites({
791
796
  config: deployConfig,
792
- managementDashboard: !1,
797
+ managementDashboard: !onlySite,
793
798
  rpxConfig: { ...tsCloudConfig, sites: sitesWithResolvedEnv },
794
799
  environment,
795
800
  driver,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.195",
5
+ "version": "0.70.196",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [