@trops/dash-core 0.1.135 → 0.1.136
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 +19 -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,
|
|
@@ -12053,14 +12051,27 @@ async function prepareDashboardForPublish$1(
|
|
|
12053
12051
|
);
|
|
12054
12052
|
}
|
|
12055
12053
|
|
|
12056
|
-
// 7.
|
|
12054
|
+
// 7. Resolve registry username for scope
|
|
12055
|
+
let registryUsername = options.githubUser || "";
|
|
12056
|
+
if (!registryUsername) {
|
|
12057
|
+
try {
|
|
12058
|
+
const { getRegistryProfile } = registryAuthController$1;
|
|
12059
|
+
const profile = await getRegistryProfile();
|
|
12060
|
+
registryUsername = profile?.username || options.authorId || "";
|
|
12061
|
+
} catch {
|
|
12062
|
+
registryUsername = options.authorId || "";
|
|
12063
|
+
}
|
|
12064
|
+
}
|
|
12065
|
+
|
|
12066
|
+
// 8. Generate registry manifest
|
|
12057
12067
|
const manifest = generateRegistryManifest(dashboardConfig, {
|
|
12058
|
-
githubUser:
|
|
12068
|
+
githubUser: registryUsername,
|
|
12059
12069
|
category: options.category || "general",
|
|
12060
12070
|
repository: options.repository || "",
|
|
12071
|
+
appOrigin: appId,
|
|
12061
12072
|
});
|
|
12062
12073
|
|
|
12063
|
-
//
|
|
12074
|
+
// 9. Show save dialog for the publish package
|
|
12064
12075
|
const sanitizedName = manifest.name;
|
|
12065
12076
|
const { canceled, filePath } = await dialog.showSaveDialog(win, {
|
|
12066
12077
|
title: "Save Dashboard Package for Registry",
|
|
@@ -12075,7 +12086,7 @@ async function prepareDashboardForPublish$1(
|
|
|
12075
12086
|
return { success: false, canceled: true };
|
|
12076
12087
|
}
|
|
12077
12088
|
|
|
12078
|
-
//
|
|
12089
|
+
// 10. Create ZIP with manifest and dashboard config
|
|
12079
12090
|
const zip = new AdmZip();
|
|
12080
12091
|
zip.addFile(
|
|
12081
12092
|
"manifest.json",
|
|
@@ -12091,7 +12102,7 @@ async function prepareDashboardForPublish$1(
|
|
|
12091
12102
|
`[DashboardConfigController] Prepared publish package: ${filePath}`,
|
|
12092
12103
|
);
|
|
12093
12104
|
|
|
12094
|
-
//
|
|
12105
|
+
// 11. Attempt to publish to registry if authenticated
|
|
12095
12106
|
let registrySubmission = null;
|
|
12096
12107
|
try {
|
|
12097
12108
|
const { getAuthStatus } = registryAuthController$1;
|