@trops/dash-core 0.1.203 → 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.
- package/dist/electron/index.js +18 -22
- package/dist/electron/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -32936,27 +32936,12 @@ async function installDashboardFromRegistry$1(
|
|
|
32936
32936
|
};
|
|
32937
32937
|
}
|
|
32938
32938
|
|
|
32939
|
-
|
|
32940
|
-
|
|
32941
|
-
|
|
32942
|
-
|
|
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}`,
|
|
@@ -33220,8 +33205,19 @@ async function prepareDashboardForPublish$1(
|
|
|
33220
33205
|
let missingFromRegistry = [];
|
|
33221
33206
|
if (!registryCheckFailed) {
|
|
33222
33207
|
const registryNames = new Set(registryPackages.map((p) => p.name));
|
|
33208
|
+
const registryWidgetNames = new Set();
|
|
33209
|
+
for (const pkg of registryPackages) {
|
|
33210
|
+
if (pkg.widgets) {
|
|
33211
|
+
for (const w of pkg.widgets) {
|
|
33212
|
+
if (w.name) registryWidgetNames.add(w.name);
|
|
33213
|
+
}
|
|
33214
|
+
}
|
|
33215
|
+
}
|
|
33223
33216
|
const missingWidgets = widgets.filter(
|
|
33224
|
-
(w) =>
|
|
33217
|
+
(w) =>
|
|
33218
|
+
w.required !== false &&
|
|
33219
|
+
!registryNames.has(w.package) &&
|
|
33220
|
+
!registryWidgetNames.has(w.package),
|
|
33225
33221
|
);
|
|
33226
33222
|
const grouped = {};
|
|
33227
33223
|
for (const w of missingWidgets) {
|