@principal-ade/code-quality-panels 0.1.22 → 0.1.24
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/panels.bundle.js
CHANGED
|
@@ -1790,14 +1790,30 @@ const mockPackages = [
|
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
1792
|
];
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1793
|
+
function getColorModeForMetric(metric, lensesRan) {
|
|
1794
|
+
const staticMappings = {
|
|
1795
|
+
types: "typescript",
|
|
1796
|
+
documentation: "alexandria",
|
|
1797
|
+
tests: "coverage",
|
|
1798
|
+
deadCode: "knip"
|
|
1799
|
+
};
|
|
1800
|
+
if (staticMappings[metric]) {
|
|
1801
|
+
return staticMappings[metric];
|
|
1802
|
+
}
|
|
1803
|
+
if (metric === "linting") {
|
|
1804
|
+
if ((lensesRan == null ? void 0 : lensesRan.includes("biome-lint")) || (lensesRan == null ? void 0 : lensesRan.includes("biome"))) {
|
|
1805
|
+
return "biome-lint";
|
|
1806
|
+
}
|
|
1807
|
+
return "eslint";
|
|
1808
|
+
}
|
|
1809
|
+
if (metric === "formatting") {
|
|
1810
|
+
if (lensesRan == null ? void 0 : lensesRan.includes("biome-format")) {
|
|
1811
|
+
return "biome-format";
|
|
1812
|
+
}
|
|
1813
|
+
return "prettier";
|
|
1814
|
+
}
|
|
1815
|
+
return null;
|
|
1816
|
+
}
|
|
1801
1817
|
const QualityHexagonPanelContent = ({
|
|
1802
1818
|
context,
|
|
1803
1819
|
events
|
|
@@ -1829,7 +1845,7 @@ const QualityHexagonPanelContent = ({
|
|
|
1829
1845
|
const packages = React2__default.useMemo(() => {
|
|
1830
1846
|
var _a2;
|
|
1831
1847
|
if ((_a2 = qualitySlice == null ? void 0 : qualitySlice.data) == null ? void 0 : _a2.packages) {
|
|
1832
|
-
return qualitySlice.data.packages;
|
|
1848
|
+
return qualitySlice.data.packages.filter((pkg) => !pkg.isOrchestrator);
|
|
1833
1849
|
}
|
|
1834
1850
|
if (hasQualitySlice) {
|
|
1835
1851
|
return [];
|
|
@@ -2023,7 +2039,7 @@ const QualityHexagonPanelContent = ({
|
|
|
2023
2039
|
});
|
|
2024
2040
|
},
|
|
2025
2041
|
onMetricClick: (metric) => {
|
|
2026
|
-
const colorMode =
|
|
2042
|
+
const colorMode = getColorModeForMetric(metric, pkg.lensesRan);
|
|
2027
2043
|
if (colorMode) {
|
|
2028
2044
|
events.emit({
|
|
2029
2045
|
type: "quality:colorMode:select",
|