@trops/dash-core 0.1.374 → 0.1.376
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 +25 -12
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +86 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +86 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -62775,17 +62775,27 @@ function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
|
62775
62775
|
downloadUrl: `https://github.com/${githubUser}/dash-registry/releases/download/${githubUser}--${name}--v{version}/dashboard-${name}-v{version}.zip`,
|
|
62776
62776
|
repository: options.repository || "",
|
|
62777
62777
|
publishedAt: new Date().toISOString(),
|
|
62778
|
-
widgets: (dashboardConfig.widgets || []).map((w) =>
|
|
62779
|
-
|
|
62780
|
-
scope
|
|
62781
|
-
|
|
62782
|
-
|
|
62783
|
-
|
|
62784
|
-
|
|
62785
|
-
|
|
62786
|
-
|
|
62787
|
-
|
|
62788
|
-
|
|
62778
|
+
widgets: (dashboardConfig.widgets || []).map((w) => {
|
|
62779
|
+
// Remap local scopes (e.g. `@ai-built/…` for AI-generated widgets)
|
|
62780
|
+
// to the caller's published scope. Local conventions are private to
|
|
62781
|
+
// the publisher's machine — installers can only resolve packages
|
|
62782
|
+
// under the scope they were actually published as.
|
|
62783
|
+
const remappedScope =
|
|
62784
|
+
options.callerScope && w.scope && w.scope !== options.callerScope
|
|
62785
|
+
? options.callerScope
|
|
62786
|
+
: w.scope || "";
|
|
62787
|
+
return {
|
|
62788
|
+
id: w.id,
|
|
62789
|
+
scope: remappedScope,
|
|
62790
|
+
packageName: w.packageName || w.package || "",
|
|
62791
|
+
widgetName: w.widgetName || (w.id ? w.id.split(".").pop() : w.package),
|
|
62792
|
+
name: w.id ? w.id.split(".").pop() : w.package,
|
|
62793
|
+
package: w.package,
|
|
62794
|
+
version: w.version || "*",
|
|
62795
|
+
required: w.required !== false,
|
|
62796
|
+
author: w.author || "",
|
|
62797
|
+
};
|
|
62798
|
+
}),
|
|
62789
62799
|
providers: dashboardConfig.providers || [],
|
|
62790
62800
|
eventWiring: dashboardConfig.eventWiring || [],
|
|
62791
62801
|
};
|
|
@@ -65317,9 +65327,12 @@ async function prepareDashboardForPublish$1(
|
|
|
65317
65327
|
registryCheckFailed = true;
|
|
65318
65328
|
}
|
|
65319
65329
|
|
|
65320
|
-
// 8. Generate registry manifest
|
|
65330
|
+
// 8. Generate registry manifest — pass callerScope so local-only
|
|
65331
|
+
// scopes (e.g. `@ai-built/…`) get rewritten to the publisher's
|
|
65332
|
+
// actual registry scope on the way out.
|
|
65321
65333
|
const manifest = generateRegistryManifest(dashboardConfig, {
|
|
65322
65334
|
githubUser: registryUsername,
|
|
65335
|
+
callerScope: registryUsername,
|
|
65323
65336
|
category: options.category || "general",
|
|
65324
65337
|
repository: options.repository || "",
|
|
65325
65338
|
appOrigin: appId,
|