@trops/dash-core 0.1.204 → 0.1.205

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.
@@ -32936,27 +32936,12 @@ async function installDashboardFromRegistry$1(
32936
32936
  };
32937
32937
  }
32938
32938
 
32939
- if (!registryPkg.downloadUrl) {
32940
- return {
32941
- success: false,
32942
- error: `Dashboard package has no download URL: ${packageName}`,
32943
- };
32944
- }
32945
-
32946
- // 2. Resolve the download URL and fetch the ZIP
32947
- const version = registryPkg.version || "1.0.0";
32948
- let downloadUrl = registryPkg.downloadUrl;
32949
- downloadUrl = downloadUrl.replace("{version}", version);
32950
- downloadUrl = downloadUrl.replace("{name}", packageName);
32951
-
32952
- // Enforce HTTPS
32953
- const parsedUrl = new URL(downloadUrl);
32954
- if (parsedUrl.protocol !== "https:") {
32955
- return {
32956
- success: false,
32957
- error: `Dashboard downloads must use HTTPS. Refusing: ${downloadUrl}`,
32958
- };
32959
- }
32939
+ // 2. Construct download URL via /api/packages/.../download endpoint
32940
+ // (matches theme download flow in themeRegistryController.js)
32941
+ const registryBaseUrl =
32942
+ process.env.DASH_REGISTRY_API_URL ||
32943
+ "https://main.d919rwhuzp7rj.amplifyapp.com";
32944
+ const downloadUrl = `${registryBaseUrl}/api/packages/${encodeURIComponent(registryPkg.scope)}/${encodeURIComponent(registryPkg.name)}/download?version=${encodeURIComponent(registryPkg.version || "1.0.0")}`;
32960
32945
 
32961
32946
  console.log(
32962
32947
  `[DashboardConfigController] Fetching dashboard from: ${downloadUrl}`,