@trops/dash-core 0.1.227 → 0.1.228

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.
@@ -29282,10 +29282,11 @@ function checkDashboardCompatibility(
29282
29282
  }
29283
29283
  }
29284
29284
 
29285
- const widgets = [];
29285
+ const widgets = {};
29286
29286
  let installedCount = 0;
29287
29287
  let toInstallCount = 0;
29288
29288
  let unavailableCount = 0;
29289
+ let hasUnavailableRequired = false;
29289
29290
 
29290
29291
  for (const dep of dashboardWidgets) {
29291
29292
  const packageName = dep.package;
@@ -29294,38 +29295,19 @@ function checkDashboardCompatibility(
29294
29295
 
29295
29296
  if (installed) {
29296
29297
  installedCount++;
29297
- widgets.push({
29298
- package: packageName,
29299
- required,
29300
- status: "installed",
29301
- installedVersion: installed.version || null,
29302
- requiredVersion: dep.version || "*",
29303
- });
29298
+ widgets[packageName] = "installed";
29304
29299
  } else if (registryByName.has(packageName)) {
29305
29300
  toInstallCount++;
29306
- const registryPkg = registryByName.get(packageName);
29307
- widgets.push({
29308
- package: packageName,
29309
- required,
29310
- status: "to-install",
29311
- availableVersion: registryPkg.version || null,
29312
- requiredVersion: dep.version || "*",
29313
- });
29301
+ widgets[packageName] = "available";
29314
29302
  } else {
29315
29303
  unavailableCount++;
29316
- widgets.push({
29317
- package: packageName,
29318
- required,
29319
- status: "unavailable",
29320
- requiredVersion: dep.version || "*",
29321
- });
29304
+ widgets[packageName] = "unavailable";
29305
+ if (required) {
29306
+ hasUnavailableRequired = true;
29307
+ }
29322
29308
  }
29323
29309
  }
29324
29310
 
29325
- const hasUnavailableRequired = widgets.some(
29326
- (w) => w.status === "unavailable" && w.required,
29327
- );
29328
-
29329
29311
  return {
29330
29312
  compatible: !hasUnavailableRequired,
29331
29313
  summary: {