@trops/dash-core 0.1.135 → 0.1.137
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 +44 -8
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +48 -66
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -8687,9 +8687,7 @@ function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
|
8687
8687
|
.toLowerCase();
|
|
8688
8688
|
|
|
8689
8689
|
const githubUser = options.githubUser || "";
|
|
8690
|
-
const version =
|
|
8691
|
-
? `1.0.${dashboardConfig.workspace.version}`
|
|
8692
|
-
: "1.0.0";
|
|
8690
|
+
const version = "1.0.0";
|
|
8693
8691
|
|
|
8694
8692
|
const manifest = {
|
|
8695
8693
|
githubUser,
|
|
@@ -8721,6 +8719,31 @@ function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
|
8721
8719
|
manifest.appOrigin = options.appOrigin || dashboardConfig.appOrigin;
|
|
8722
8720
|
}
|
|
8723
8721
|
|
|
8722
|
+
// Include theme metadata if dashboard bundles a theme
|
|
8723
|
+
if (dashboardConfig.theme) {
|
|
8724
|
+
manifest.theme = {
|
|
8725
|
+
key: dashboardConfig.theme.key || "",
|
|
8726
|
+
name: dashboardConfig.theme.data?.name || dashboardConfig.theme.key || "",
|
|
8727
|
+
};
|
|
8728
|
+
if (dashboardConfig.theme.registryPackage) {
|
|
8729
|
+
manifest.theme.registryPackage = dashboardConfig.theme.registryPackage;
|
|
8730
|
+
}
|
|
8731
|
+
// Extract color values for display
|
|
8732
|
+
const td = dashboardConfig.theme.data;
|
|
8733
|
+
if (td) {
|
|
8734
|
+
const colors = {};
|
|
8735
|
+
if (td.primary || td.colors?.primary)
|
|
8736
|
+
colors.primary = td.primary || td.colors.primary;
|
|
8737
|
+
if (td.secondary || td.colors?.secondary)
|
|
8738
|
+
colors.secondary = td.secondary || td.colors.secondary;
|
|
8739
|
+
if (td.tertiary || td.colors?.tertiary)
|
|
8740
|
+
colors.tertiary = td.tertiary || td.colors.tertiary;
|
|
8741
|
+
if (Object.keys(colors).length > 0) {
|
|
8742
|
+
manifest.theme.colors = colors;
|
|
8743
|
+
}
|
|
8744
|
+
}
|
|
8745
|
+
}
|
|
8746
|
+
|
|
8724
8747
|
return manifest;
|
|
8725
8748
|
}
|
|
8726
8749
|
|
|
@@ -12053,14 +12076,27 @@ async function prepareDashboardForPublish$1(
|
|
|
12053
12076
|
);
|
|
12054
12077
|
}
|
|
12055
12078
|
|
|
12056
|
-
// 7.
|
|
12079
|
+
// 7. Resolve registry username for scope
|
|
12080
|
+
let registryUsername = options.githubUser || "";
|
|
12081
|
+
if (!registryUsername) {
|
|
12082
|
+
try {
|
|
12083
|
+
const { getRegistryProfile } = registryAuthController$1;
|
|
12084
|
+
const profile = await getRegistryProfile();
|
|
12085
|
+
registryUsername = profile?.username || options.authorId || "";
|
|
12086
|
+
} catch {
|
|
12087
|
+
registryUsername = options.authorId || "";
|
|
12088
|
+
}
|
|
12089
|
+
}
|
|
12090
|
+
|
|
12091
|
+
// 8. Generate registry manifest
|
|
12057
12092
|
const manifest = generateRegistryManifest(dashboardConfig, {
|
|
12058
|
-
githubUser:
|
|
12093
|
+
githubUser: registryUsername,
|
|
12059
12094
|
category: options.category || "general",
|
|
12060
12095
|
repository: options.repository || "",
|
|
12096
|
+
appOrigin: appId,
|
|
12061
12097
|
});
|
|
12062
12098
|
|
|
12063
|
-
//
|
|
12099
|
+
// 9. Show save dialog for the publish package
|
|
12064
12100
|
const sanitizedName = manifest.name;
|
|
12065
12101
|
const { canceled, filePath } = await dialog.showSaveDialog(win, {
|
|
12066
12102
|
title: "Save Dashboard Package for Registry",
|
|
@@ -12075,7 +12111,7 @@ async function prepareDashboardForPublish$1(
|
|
|
12075
12111
|
return { success: false, canceled: true };
|
|
12076
12112
|
}
|
|
12077
12113
|
|
|
12078
|
-
//
|
|
12114
|
+
// 10. Create ZIP with manifest and dashboard config
|
|
12079
12115
|
const zip = new AdmZip();
|
|
12080
12116
|
zip.addFile(
|
|
12081
12117
|
"manifest.json",
|
|
@@ -12091,7 +12127,7 @@ async function prepareDashboardForPublish$1(
|
|
|
12091
12127
|
`[DashboardConfigController] Prepared publish package: ${filePath}`,
|
|
12092
12128
|
);
|
|
12093
12129
|
|
|
12094
|
-
//
|
|
12130
|
+
// 11. Attempt to publish to registry if authenticated
|
|
12095
12131
|
let registrySubmission = null;
|
|
12096
12132
|
try {
|
|
12097
12133
|
const { getAuthStatus } = registryAuthController$1;
|