@trops/dash-core 0.1.94 → 0.1.96
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 +20 -23
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +396 -89
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +395 -88
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -10146,10 +10146,9 @@ async function exportDashboardConfig$1(
|
|
|
10146
10146
|
schemaVersion: CURRENT_SCHEMA_VERSION,
|
|
10147
10147
|
name: workspace.name || workspace.label || "Exported Dashboard",
|
|
10148
10148
|
description: options.description || "",
|
|
10149
|
-
|
|
10150
|
-
name: options.authorName || ""
|
|
10151
|
-
|
|
10152
|
-
},
|
|
10149
|
+
...(options.authorName
|
|
10150
|
+
? { author: { name: options.authorName, id: options.authorId || "" } }
|
|
10151
|
+
: {}),
|
|
10153
10152
|
shareable: true,
|
|
10154
10153
|
tags: options.tags || [],
|
|
10155
10154
|
icon: options.icon || "grip",
|
|
@@ -10700,10 +10699,9 @@ async function prepareDashboardForPublish$1(
|
|
|
10700
10699
|
schemaVersion: CURRENT_SCHEMA_VERSION,
|
|
10701
10700
|
name: workspace.name || workspace.label || "Dashboard",
|
|
10702
10701
|
description: options.description || "",
|
|
10703
|
-
|
|
10704
|
-
name: options.authorName || ""
|
|
10705
|
-
|
|
10706
|
-
},
|
|
10702
|
+
...(options.authorName
|
|
10703
|
+
? { author: { name: options.authorName, id: options.authorId || "" } }
|
|
10704
|
+
: {}),
|
|
10707
10705
|
shareable: true,
|
|
10708
10706
|
tags: options.tags || [],
|
|
10709
10707
|
icon: options.icon || "grip",
|
|
@@ -10730,29 +10728,26 @@ async function prepareDashboardForPublish$1(
|
|
|
10730
10728
|
};
|
|
10731
10729
|
}
|
|
10732
10730
|
|
|
10733
|
-
// 5.
|
|
10731
|
+
// 5. Check which widgets exist in the registry (soft warning, not blocking)
|
|
10734
10732
|
const { fetchRegistryIndex } = registryController$1;
|
|
10735
10733
|
let registryPackages = [];
|
|
10734
|
+
let registryCheckFailed = false;
|
|
10736
10735
|
try {
|
|
10737
10736
|
const index = await fetchRegistryIndex();
|
|
10738
10737
|
registryPackages = index.packages || [];
|
|
10739
10738
|
} catch (err) {
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10739
|
+
console.warn(
|
|
10740
|
+
`[DashboardConfigController] Unable to verify registry: ${err.message}`,
|
|
10741
|
+
);
|
|
10742
|
+
registryCheckFailed = true;
|
|
10744
10743
|
}
|
|
10745
10744
|
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
.
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
return {
|
|
10753
|
-
success: false,
|
|
10754
|
-
error: `Required widgets not found in registry: ${missingFromRegistry.join(", ")}. Publish them first.`,
|
|
10755
|
-
};
|
|
10745
|
+
let missingFromRegistry = [];
|
|
10746
|
+
if (!registryCheckFailed) {
|
|
10747
|
+
const registryNames = new Set(registryPackages.map((p) => p.name));
|
|
10748
|
+
missingFromRegistry = widgets
|
|
10749
|
+
.filter((w) => w.required !== false && !registryNames.has(w.package))
|
|
10750
|
+
.map((w) => w.package);
|
|
10756
10751
|
}
|
|
10757
10752
|
|
|
10758
10753
|
// 6. Generate registry manifest
|
|
@@ -10795,6 +10790,8 @@ async function prepareDashboardForPublish$1(
|
|
|
10795
10790
|
filePath,
|
|
10796
10791
|
manifest,
|
|
10797
10792
|
config: dashboardConfig,
|
|
10793
|
+
warnings: missingFromRegistry.length > 0 ? missingFromRegistry : undefined,
|
|
10794
|
+
registryCheckFailed: registryCheckFailed || undefined,
|
|
10798
10795
|
};
|
|
10799
10796
|
} catch (error) {
|
|
10800
10797
|
console.error(
|