@principal-ade/code-quality-panels 0.1.4 → 0.1.6
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
|
@@ -106,34 +106,47 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
108
|
*/
|
|
109
|
-
const __iconNode$
|
|
110
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
109
|
+
const __iconNode$7 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
110
|
+
const Check = createLucideIcon("check", __iconNode$7);
|
|
111
111
|
/**
|
|
112
112
|
* @license lucide-react v0.552.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
116
|
*/
|
|
117
|
-
const __iconNode$
|
|
118
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
117
|
+
const __iconNode$6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
118
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$6);
|
|
119
119
|
/**
|
|
120
120
|
* @license lucide-react v0.552.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
124
|
*/
|
|
125
|
-
const __iconNode$
|
|
125
|
+
const __iconNode$5 = [
|
|
126
126
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
127
127
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
128
128
|
];
|
|
129
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
129
|
+
const Copy = createLucideIcon("copy", __iconNode$5);
|
|
130
130
|
/**
|
|
131
131
|
* @license lucide-react v0.552.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
135
|
*/
|
|
136
|
-
const __iconNode$
|
|
136
|
+
const __iconNode$4 = [
|
|
137
|
+
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
138
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
139
|
+
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
140
|
+
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
141
|
+
];
|
|
142
|
+
const GitBranch = createLucideIcon("git-branch", __iconNode$4);
|
|
143
|
+
/**
|
|
144
|
+
* @license lucide-react v0.552.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/
|
|
149
|
+
const __iconNode$3 = [
|
|
137
150
|
[
|
|
138
151
|
"path",
|
|
139
152
|
{
|
|
@@ -142,18 +155,46 @@ const __iconNode$1 = [
|
|
|
142
155
|
}
|
|
143
156
|
]
|
|
144
157
|
];
|
|
145
|
-
const Hexagon = createLucideIcon("hexagon", __iconNode$
|
|
158
|
+
const Hexagon = createLucideIcon("hexagon", __iconNode$3);
|
|
146
159
|
/**
|
|
147
160
|
* @license lucide-react v0.552.0 - ISC
|
|
148
161
|
*
|
|
149
162
|
* This source code is licensed under the ISC license.
|
|
150
163
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
164
|
*/
|
|
152
|
-
const __iconNode = [
|
|
165
|
+
const __iconNode$2 = [
|
|
166
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
167
|
+
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
168
|
+
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
169
|
+
];
|
|
170
|
+
const Info = createLucideIcon("info", __iconNode$2);
|
|
171
|
+
/**
|
|
172
|
+
* @license lucide-react v0.552.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/
|
|
177
|
+
const __iconNode$1 = [
|
|
153
178
|
["path", { d: "M12 19h8", key: "baeox8" }],
|
|
154
179
|
["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
|
|
155
180
|
];
|
|
156
|
-
const Terminal = createLucideIcon("terminal", __iconNode);
|
|
181
|
+
const Terminal = createLucideIcon("terminal", __iconNode$1);
|
|
182
|
+
/**
|
|
183
|
+
* @license lucide-react v0.552.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/
|
|
188
|
+
const __iconNode = [
|
|
189
|
+
[
|
|
190
|
+
"path",
|
|
191
|
+
{
|
|
192
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
193
|
+
key: "1xq2db"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
];
|
|
197
|
+
const Zap = createLucideIcon("zap", __iconNode);
|
|
157
198
|
var ThemeContext;
|
|
158
199
|
var getThemeContext = () => {
|
|
159
200
|
if (typeof window !== "undefined") {
|
|
@@ -824,7 +865,7 @@ function checkFileExistsInTree(treeData, targetPath) {
|
|
|
824
865
|
return filePath.endsWith(normalizedTarget) || filePath === normalizedTarget;
|
|
825
866
|
});
|
|
826
867
|
}
|
|
827
|
-
const CommandLine
|
|
868
|
+
const CommandLine = ({ command, theme, label }) => {
|
|
828
869
|
const [copied, setCopied] = React2__default.useState(false);
|
|
829
870
|
const handleCopy = async () => {
|
|
830
871
|
try {
|
|
@@ -835,42 +876,90 @@ const CommandLine$1 = ({ command, theme }) => {
|
|
|
835
876
|
console.log("Copy:", command);
|
|
836
877
|
}
|
|
837
878
|
};
|
|
838
|
-
return /* @__PURE__ */ jsxs(
|
|
879
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
880
|
+
label && /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.colors.textMuted }, children: label }),
|
|
881
|
+
/* @__PURE__ */ jsxs(
|
|
882
|
+
"div",
|
|
883
|
+
{
|
|
884
|
+
style: {
|
|
885
|
+
display: "flex",
|
|
886
|
+
alignItems: "center",
|
|
887
|
+
justifyContent: "space-between",
|
|
888
|
+
gap: 12,
|
|
889
|
+
padding: "10px 14px",
|
|
890
|
+
borderRadius: 6,
|
|
891
|
+
backgroundColor: theme.colors.background,
|
|
892
|
+
border: `1px solid ${theme.colors.border}`,
|
|
893
|
+
fontFamily: "monospace",
|
|
894
|
+
fontSize: 13
|
|
895
|
+
},
|
|
896
|
+
children: [
|
|
897
|
+
/* @__PURE__ */ jsx("code", { style: { color: theme.colors.text }, children: command }),
|
|
898
|
+
/* @__PURE__ */ jsx(
|
|
899
|
+
"button",
|
|
900
|
+
{
|
|
901
|
+
onClick: handleCopy,
|
|
902
|
+
style: {
|
|
903
|
+
display: "flex",
|
|
904
|
+
alignItems: "center",
|
|
905
|
+
justifyContent: "center",
|
|
906
|
+
padding: 4,
|
|
907
|
+
border: "none",
|
|
908
|
+
backgroundColor: "transparent",
|
|
909
|
+
color: theme.colors.textMuted,
|
|
910
|
+
cursor: "pointer"
|
|
911
|
+
},
|
|
912
|
+
title: "Copy command",
|
|
913
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, color: theme.colors.success }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
|
|
914
|
+
}
|
|
915
|
+
)
|
|
916
|
+
]
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
] });
|
|
920
|
+
};
|
|
921
|
+
const MetricsPreview = ({ theme }) => {
|
|
922
|
+
const metrics = [
|
|
923
|
+
{ key: "tests", label: "Tests", description: "Test coverage & pass rate", icon: "🧪" },
|
|
924
|
+
{ key: "linting", label: "Linting", description: "ESLint code quality", icon: "📝" },
|
|
925
|
+
{ key: "types", label: "Types", description: "TypeScript type safety", icon: "🔷" },
|
|
926
|
+
{ key: "formatting", label: "Formatting", description: "Prettier code style", icon: "✨" },
|
|
927
|
+
{ key: "deadCode", label: "Dead Code", description: "Unused exports & deps", icon: "🧹" },
|
|
928
|
+
{ key: "documentation", label: "Docs", description: "Code documentation", icon: "📚" }
|
|
929
|
+
];
|
|
930
|
+
return /* @__PURE__ */ jsx(
|
|
839
931
|
"div",
|
|
840
932
|
{
|
|
841
933
|
style: {
|
|
842
|
-
display: "
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
border: `1px solid ${theme.colors.border}`,
|
|
850
|
-
fontFamily: "monospace",
|
|
851
|
-
fontSize: 13
|
|
934
|
+
display: "grid",
|
|
935
|
+
gridTemplateColumns: "repeat(2, 1fr)",
|
|
936
|
+
gap: 8,
|
|
937
|
+
padding: 12,
|
|
938
|
+
borderRadius: 8,
|
|
939
|
+
backgroundColor: theme.colors.surface,
|
|
940
|
+
border: `1px solid ${theme.colors.border}`
|
|
852
941
|
},
|
|
853
|
-
children:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
942
|
+
children: metrics.map((m) => /* @__PURE__ */ jsxs(
|
|
943
|
+
"div",
|
|
944
|
+
{
|
|
945
|
+
style: {
|
|
946
|
+
display: "flex",
|
|
947
|
+
alignItems: "center",
|
|
948
|
+
gap: 8,
|
|
949
|
+
padding: "6px 8px",
|
|
950
|
+
borderRadius: 4,
|
|
951
|
+
fontSize: 12
|
|
952
|
+
},
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: 14 }, children: m.icon }),
|
|
955
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
956
|
+
/* @__PURE__ */ jsx("span", { style: { fontWeight: 500, color: theme.colors.text }, children: m.label }),
|
|
957
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: theme.colors.textMuted }, children: m.description })
|
|
958
|
+
] })
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
m.key
|
|
962
|
+
))
|
|
874
963
|
}
|
|
875
964
|
);
|
|
876
965
|
};
|
|
@@ -878,6 +967,7 @@ const QualityEmptyState = ({
|
|
|
878
967
|
theme,
|
|
879
968
|
hasWorkflow
|
|
880
969
|
}) => {
|
|
970
|
+
const [showAdvanced, setShowAdvanced] = React2__default.useState(false);
|
|
881
971
|
if (hasWorkflow) {
|
|
882
972
|
return /* @__PURE__ */ jsxs(
|
|
883
973
|
"div",
|
|
@@ -890,6 +980,28 @@ const QualityEmptyState = ({
|
|
|
890
980
|
width: "100%"
|
|
891
981
|
},
|
|
892
982
|
children: [
|
|
983
|
+
/* @__PURE__ */ jsxs(
|
|
984
|
+
"div",
|
|
985
|
+
{
|
|
986
|
+
style: {
|
|
987
|
+
display: "flex",
|
|
988
|
+
alignItems: "center",
|
|
989
|
+
gap: 8,
|
|
990
|
+
padding: "10px 14px",
|
|
991
|
+
borderRadius: 6,
|
|
992
|
+
backgroundColor: `${theme.colors.success}15`,
|
|
993
|
+
color: theme.colors.success,
|
|
994
|
+
fontSize: 13
|
|
995
|
+
},
|
|
996
|
+
children: [
|
|
997
|
+
/* @__PURE__ */ jsx(Check, { size: 16 }),
|
|
998
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
999
|
+
"Workflow detected at ",
|
|
1000
|
+
WORKFLOW_FILE_PATH
|
|
1001
|
+
] })
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
),
|
|
893
1005
|
/* @__PURE__ */ jsx(
|
|
894
1006
|
"p",
|
|
895
1007
|
{
|
|
@@ -899,27 +1011,31 @@ const QualityEmptyState = ({
|
|
|
899
1011
|
color: theme.colors.textMuted,
|
|
900
1012
|
lineHeight: 1.5
|
|
901
1013
|
},
|
|
902
|
-
children: "Quality metrics will appear here after your
|
|
1014
|
+
children: "Quality metrics will appear here after your workflow runs. Push a commit to trigger it, or check the Actions tab for status."
|
|
903
1015
|
}
|
|
904
1016
|
),
|
|
1017
|
+
/* @__PURE__ */ jsx(MetricsPreview, { theme }),
|
|
905
1018
|
/* @__PURE__ */ jsxs(
|
|
906
1019
|
"div",
|
|
907
1020
|
{
|
|
908
1021
|
style: {
|
|
909
1022
|
display: "flex",
|
|
910
|
-
alignItems: "
|
|
1023
|
+
alignItems: "flex-start",
|
|
911
1024
|
gap: 8,
|
|
912
1025
|
padding: "10px 14px",
|
|
913
1026
|
borderRadius: 6,
|
|
914
|
-
backgroundColor: `${theme.colors.
|
|
915
|
-
|
|
916
|
-
|
|
1027
|
+
backgroundColor: `${theme.colors.warning}10`,
|
|
1028
|
+
fontSize: 12,
|
|
1029
|
+
color: theme.colors.textMuted
|
|
917
1030
|
},
|
|
918
1031
|
children: [
|
|
919
|
-
/* @__PURE__ */ jsx(
|
|
920
|
-
/* @__PURE__ */ jsxs("
|
|
921
|
-
"
|
|
922
|
-
|
|
1032
|
+
/* @__PURE__ */ jsx(Info, { size: 14, style: { flexShrink: 0, marginTop: 2 }, color: theme.colors.warning }),
|
|
1033
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1034
|
+
/* @__PURE__ */ jsx("strong", { style: { color: theme.colors.text }, children: "Using private npm packages?" }),
|
|
1035
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
1036
|
+
"Add ",
|
|
1037
|
+
/* @__PURE__ */ jsx("code", { style: { backgroundColor: theme.colors.background, padding: "1px 4px", borderRadius: 3 }, children: "NPM_TOKEN" }),
|
|
1038
|
+
" to your repository secrets and ensure the workflow has access to it."
|
|
923
1039
|
] })
|
|
924
1040
|
]
|
|
925
1041
|
}
|
|
@@ -939,26 +1055,138 @@ const QualityEmptyState = ({
|
|
|
939
1055
|
width: "100%"
|
|
940
1056
|
},
|
|
941
1057
|
children: [
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
|
|
1058
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1059
|
+
/* @__PURE__ */ jsx(
|
|
1060
|
+
"h4",
|
|
1061
|
+
{
|
|
1062
|
+
style: {
|
|
1063
|
+
margin: "0 0 12px 0",
|
|
1064
|
+
fontSize: 14,
|
|
1065
|
+
fontWeight: 600,
|
|
1066
|
+
color: theme.colors.text
|
|
1067
|
+
},
|
|
1068
|
+
children: "Track 6 quality dimensions"
|
|
1069
|
+
}
|
|
1070
|
+
),
|
|
1071
|
+
/* @__PURE__ */ jsx(MetricsPreview, { theme })
|
|
1072
|
+
] }),
|
|
1073
|
+
/* @__PURE__ */ jsxs(
|
|
1074
|
+
"div",
|
|
944
1075
|
{
|
|
945
1076
|
style: {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1077
|
+
display: "flex",
|
|
1078
|
+
flexDirection: "column",
|
|
1079
|
+
gap: 12,
|
|
1080
|
+
padding: 16,
|
|
1081
|
+
borderRadius: 8,
|
|
1082
|
+
backgroundColor: theme.colors.surface,
|
|
1083
|
+
border: `1px solid ${theme.colors.border}`
|
|
950
1084
|
},
|
|
951
|
-
children:
|
|
1085
|
+
children: [
|
|
1086
|
+
/* @__PURE__ */ jsxs(
|
|
1087
|
+
"div",
|
|
1088
|
+
{
|
|
1089
|
+
style: {
|
|
1090
|
+
display: "flex",
|
|
1091
|
+
alignItems: "center",
|
|
1092
|
+
gap: 8
|
|
1093
|
+
},
|
|
1094
|
+
children: [
|
|
1095
|
+
/* @__PURE__ */ jsx(Zap, { size: 18, color: theme.colors.primary }),
|
|
1096
|
+
/* @__PURE__ */ jsx(
|
|
1097
|
+
"h4",
|
|
1098
|
+
{
|
|
1099
|
+
style: {
|
|
1100
|
+
margin: 0,
|
|
1101
|
+
fontSize: 14,
|
|
1102
|
+
fontWeight: 600,
|
|
1103
|
+
color: theme.colors.text
|
|
1104
|
+
},
|
|
1105
|
+
children: "Quick Start"
|
|
1106
|
+
}
|
|
1107
|
+
)
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1110
|
+
),
|
|
1111
|
+
/* @__PURE__ */ jsx(
|
|
1112
|
+
"p",
|
|
1113
|
+
{
|
|
1114
|
+
style: {
|
|
1115
|
+
margin: 0,
|
|
1116
|
+
fontSize: 13,
|
|
1117
|
+
color: theme.colors.textMuted,
|
|
1118
|
+
lineHeight: 1.5
|
|
1119
|
+
},
|
|
1120
|
+
children: "Run this in your project directory to set up automated quality tracking:"
|
|
1121
|
+
}
|
|
1122
|
+
),
|
|
1123
|
+
/* @__PURE__ */ jsx(
|
|
1124
|
+
CommandLine,
|
|
1125
|
+
{
|
|
1126
|
+
command: "npx @principal-ai/quality-lens-cli init",
|
|
1127
|
+
theme
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ jsxs(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
style: {
|
|
1134
|
+
display: "flex",
|
|
1135
|
+
alignItems: "center",
|
|
1136
|
+
gap: 6,
|
|
1137
|
+
fontSize: 12,
|
|
1138
|
+
color: theme.colors.textMuted
|
|
1139
|
+
},
|
|
1140
|
+
children: [
|
|
1141
|
+
/* @__PURE__ */ jsx(GitBranch, { size: 14 }),
|
|
1142
|
+
/* @__PURE__ */ jsx("span", { children: "Then commit and push to start tracking" })
|
|
1143
|
+
]
|
|
1144
|
+
}
|
|
1145
|
+
)
|
|
1146
|
+
]
|
|
952
1147
|
}
|
|
953
1148
|
),
|
|
954
1149
|
/* @__PURE__ */ jsxs(
|
|
1150
|
+
"button",
|
|
1151
|
+
{
|
|
1152
|
+
onClick: () => setShowAdvanced(!showAdvanced),
|
|
1153
|
+
style: {
|
|
1154
|
+
display: "flex",
|
|
1155
|
+
alignItems: "center",
|
|
1156
|
+
gap: 6,
|
|
1157
|
+
padding: 0,
|
|
1158
|
+
border: "none",
|
|
1159
|
+
backgroundColor: "transparent",
|
|
1160
|
+
color: theme.colors.textMuted,
|
|
1161
|
+
fontSize: 13,
|
|
1162
|
+
cursor: "pointer"
|
|
1163
|
+
},
|
|
1164
|
+
children: [
|
|
1165
|
+
/* @__PURE__ */ jsx(
|
|
1166
|
+
ChevronRight,
|
|
1167
|
+
{
|
|
1168
|
+
size: 14,
|
|
1169
|
+
style: {
|
|
1170
|
+
transform: showAdvanced ? "rotate(90deg)" : "none",
|
|
1171
|
+
transition: "transform 0.2s"
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
),
|
|
1175
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1176
|
+
showAdvanced ? "Hide" : "Show",
|
|
1177
|
+
" additional options"
|
|
1178
|
+
] })
|
|
1179
|
+
]
|
|
1180
|
+
}
|
|
1181
|
+
),
|
|
1182
|
+
showAdvanced && /* @__PURE__ */ jsxs(
|
|
955
1183
|
"div",
|
|
956
1184
|
{
|
|
957
1185
|
style: {
|
|
958
1186
|
display: "flex",
|
|
959
1187
|
flexDirection: "column",
|
|
960
1188
|
gap: 16,
|
|
961
|
-
padding:
|
|
1189
|
+
padding: 16,
|
|
962
1190
|
borderRadius: 8,
|
|
963
1191
|
backgroundColor: theme.colors.surface,
|
|
964
1192
|
border: `1px solid ${theme.colors.border}`
|
|
@@ -970,157 +1198,71 @@ const QualityEmptyState = ({
|
|
|
970
1198
|
style: {
|
|
971
1199
|
display: "flex",
|
|
972
1200
|
alignItems: "center",
|
|
973
|
-
gap:
|
|
974
|
-
marginBottom: 4
|
|
1201
|
+
gap: 8
|
|
975
1202
|
},
|
|
976
1203
|
children: [
|
|
977
|
-
/* @__PURE__ */ jsx(Terminal, { size:
|
|
1204
|
+
/* @__PURE__ */ jsx(Terminal, { size: 18, color: theme.colors.text }),
|
|
978
1205
|
/* @__PURE__ */ jsx(
|
|
979
1206
|
"h4",
|
|
980
1207
|
{
|
|
981
1208
|
style: {
|
|
982
1209
|
margin: 0,
|
|
983
|
-
fontSize:
|
|
1210
|
+
fontSize: 14,
|
|
984
1211
|
fontWeight: 600,
|
|
985
1212
|
color: theme.colors.text
|
|
986
1213
|
},
|
|
987
|
-
children: "
|
|
1214
|
+
children: "CLI Commands"
|
|
988
1215
|
}
|
|
989
1216
|
)
|
|
990
1217
|
]
|
|
991
1218
|
}
|
|
992
1219
|
),
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
color: theme.colors.background,
|
|
1018
|
-
fontSize: 11,
|
|
1019
|
-
fontWeight: 600
|
|
1020
|
-
},
|
|
1021
|
-
children: "1"
|
|
1022
|
-
}
|
|
1023
|
-
),
|
|
1024
|
-
/* @__PURE__ */ jsx("span", { children: "Install the CLI" })
|
|
1025
|
-
]
|
|
1026
|
-
}
|
|
1027
|
-
),
|
|
1028
|
-
/* @__PURE__ */ jsx(
|
|
1029
|
-
CommandLine$1,
|
|
1030
|
-
{
|
|
1031
|
-
command: "npm install -g @principal-ai/quality-lens-cli",
|
|
1032
|
-
theme
|
|
1033
|
-
}
|
|
1034
|
-
)
|
|
1035
|
-
] }),
|
|
1036
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1037
|
-
/* @__PURE__ */ jsxs(
|
|
1038
|
-
"div",
|
|
1039
|
-
{
|
|
1040
|
-
style: {
|
|
1041
|
-
display: "flex",
|
|
1042
|
-
alignItems: "center",
|
|
1043
|
-
gap: 8,
|
|
1044
|
-
marginBottom: 8,
|
|
1045
|
-
fontSize: 13,
|
|
1046
|
-
color: theme.colors.textMuted
|
|
1047
|
-
},
|
|
1048
|
-
children: [
|
|
1049
|
-
/* @__PURE__ */ jsx(
|
|
1050
|
-
"span",
|
|
1051
|
-
{
|
|
1052
|
-
style: {
|
|
1053
|
-
display: "flex",
|
|
1054
|
-
alignItems: "center",
|
|
1055
|
-
justifyContent: "center",
|
|
1056
|
-
width: 20,
|
|
1057
|
-
height: 20,
|
|
1058
|
-
borderRadius: "50%",
|
|
1059
|
-
backgroundColor: theme.colors.primary,
|
|
1060
|
-
color: theme.colors.background,
|
|
1061
|
-
fontSize: 11,
|
|
1062
|
-
fontWeight: 600
|
|
1063
|
-
},
|
|
1064
|
-
children: "2"
|
|
1065
|
-
}
|
|
1066
|
-
),
|
|
1067
|
-
/* @__PURE__ */ jsx("span", { children: "Check what quality tools are available" })
|
|
1068
|
-
]
|
|
1069
|
-
}
|
|
1070
|
-
),
|
|
1071
|
-
/* @__PURE__ */ jsx(CommandLine$1, { command: "quality-lens list", theme })
|
|
1072
|
-
] }),
|
|
1073
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1074
|
-
/* @__PURE__ */ jsxs(
|
|
1075
|
-
"div",
|
|
1076
|
-
{
|
|
1077
|
-
style: {
|
|
1078
|
-
display: "flex",
|
|
1079
|
-
alignItems: "center",
|
|
1080
|
-
gap: 8,
|
|
1081
|
-
marginBottom: 8,
|
|
1082
|
-
fontSize: 13,
|
|
1083
|
-
color: theme.colors.textMuted
|
|
1084
|
-
},
|
|
1085
|
-
children: [
|
|
1086
|
-
/* @__PURE__ */ jsx(
|
|
1087
|
-
"span",
|
|
1088
|
-
{
|
|
1089
|
-
style: {
|
|
1090
|
-
display: "flex",
|
|
1091
|
-
alignItems: "center",
|
|
1092
|
-
justifyContent: "center",
|
|
1093
|
-
width: 20,
|
|
1094
|
-
height: 20,
|
|
1095
|
-
borderRadius: "50%",
|
|
1096
|
-
backgroundColor: theme.colors.primary,
|
|
1097
|
-
color: theme.colors.background,
|
|
1098
|
-
fontSize: 11,
|
|
1099
|
-
fontWeight: 600
|
|
1100
|
-
},
|
|
1101
|
-
children: "3"
|
|
1102
|
-
}
|
|
1103
|
-
),
|
|
1104
|
-
/* @__PURE__ */ jsx("span", { children: "Set up the GitHub Action" })
|
|
1105
|
-
]
|
|
1106
|
-
}
|
|
1107
|
-
),
|
|
1108
|
-
/* @__PURE__ */ jsx(CommandLine$1, { command: "quality-lens init", theme })
|
|
1109
|
-
] }),
|
|
1220
|
+
/* @__PURE__ */ jsx(
|
|
1221
|
+
CommandLine,
|
|
1222
|
+
{
|
|
1223
|
+
command: "npx @principal-ai/quality-lens-cli list",
|
|
1224
|
+
theme,
|
|
1225
|
+
label: "See available quality tools in your project"
|
|
1226
|
+
}
|
|
1227
|
+
),
|
|
1228
|
+
/* @__PURE__ */ jsx(
|
|
1229
|
+
CommandLine,
|
|
1230
|
+
{
|
|
1231
|
+
command: "npx @principal-ai/quality-lens-cli run . --install",
|
|
1232
|
+
theme,
|
|
1233
|
+
label: "Run quality checks locally (auto-installs missing tools)"
|
|
1234
|
+
}
|
|
1235
|
+
),
|
|
1236
|
+
/* @__PURE__ */ jsx(
|
|
1237
|
+
CommandLine,
|
|
1238
|
+
{
|
|
1239
|
+
command: "npm install -g @principal-ai/quality-lens-cli",
|
|
1240
|
+
theme,
|
|
1241
|
+
label: "Install globally for faster repeated use"
|
|
1242
|
+
}
|
|
1243
|
+
),
|
|
1110
1244
|
/* @__PURE__ */ jsxs(
|
|
1111
1245
|
"div",
|
|
1112
1246
|
{
|
|
1113
1247
|
style: {
|
|
1114
1248
|
display: "flex",
|
|
1115
|
-
alignItems: "
|
|
1116
|
-
gap:
|
|
1117
|
-
|
|
1118
|
-
|
|
1249
|
+
alignItems: "flex-start",
|
|
1250
|
+
gap: 8,
|
|
1251
|
+
padding: "10px 14px",
|
|
1252
|
+
borderRadius: 6,
|
|
1253
|
+
backgroundColor: `${theme.colors.warning}10`,
|
|
1254
|
+
fontSize: 12,
|
|
1119
1255
|
color: theme.colors.textMuted
|
|
1120
1256
|
},
|
|
1121
1257
|
children: [
|
|
1122
|
-
/* @__PURE__ */ jsx(
|
|
1123
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ jsx(Info, { size: 14, style: { flexShrink: 0, marginTop: 2 }, color: theme.colors.warning }),
|
|
1259
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1260
|
+
/* @__PURE__ */ jsx("strong", { style: { color: theme.colors.text }, children: "Private npm packages?" }),
|
|
1261
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
1262
|
+
"If your project uses private @org packages, add ",
|
|
1263
|
+
/* @__PURE__ */ jsx("code", { style: { backgroundColor: theme.colors.background, padding: "1px 4px", borderRadius: 3 }, children: "NPM_TOKEN" }),
|
|
1264
|
+
" to your GitHub repository secrets under Settings → Secrets → Actions, and set the workflow environment if needed."
|
|
1265
|
+
] })
|
|
1124
1266
|
]
|
|
1125
1267
|
}
|
|
1126
1268
|
)
|
|
@@ -1723,258 +1865,6 @@ function RepositoryQualityGrid({
|
|
|
1723
1865
|
}
|
|
1724
1866
|
);
|
|
1725
1867
|
}
|
|
1726
|
-
const CommandLine = ({ command, theme }) => {
|
|
1727
|
-
const [copied, setCopied] = React2__default.useState(false);
|
|
1728
|
-
const handleCopy = async () => {
|
|
1729
|
-
try {
|
|
1730
|
-
await navigator.clipboard.writeText(command);
|
|
1731
|
-
setCopied(true);
|
|
1732
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
1733
|
-
} catch {
|
|
1734
|
-
console.log("Copy:", command);
|
|
1735
|
-
}
|
|
1736
|
-
};
|
|
1737
|
-
return /* @__PURE__ */ jsxs(
|
|
1738
|
-
"div",
|
|
1739
|
-
{
|
|
1740
|
-
style: {
|
|
1741
|
-
display: "flex",
|
|
1742
|
-
alignItems: "center",
|
|
1743
|
-
justifyContent: "space-between",
|
|
1744
|
-
gap: 12,
|
|
1745
|
-
padding: "10px 14px",
|
|
1746
|
-
borderRadius: 6,
|
|
1747
|
-
backgroundColor: theme.colors.background,
|
|
1748
|
-
border: `1px solid ${theme.colors.border}`,
|
|
1749
|
-
fontFamily: "monospace",
|
|
1750
|
-
fontSize: 13
|
|
1751
|
-
},
|
|
1752
|
-
children: [
|
|
1753
|
-
/* @__PURE__ */ jsx("code", { style: { color: theme.colors.text }, children: command }),
|
|
1754
|
-
/* @__PURE__ */ jsx(
|
|
1755
|
-
"button",
|
|
1756
|
-
{
|
|
1757
|
-
onClick: handleCopy,
|
|
1758
|
-
style: {
|
|
1759
|
-
display: "flex",
|
|
1760
|
-
alignItems: "center",
|
|
1761
|
-
justifyContent: "center",
|
|
1762
|
-
padding: 4,
|
|
1763
|
-
border: "none",
|
|
1764
|
-
backgroundColor: "transparent",
|
|
1765
|
-
color: theme.colors.textMuted,
|
|
1766
|
-
cursor: "pointer"
|
|
1767
|
-
},
|
|
1768
|
-
title: "Copy command",
|
|
1769
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, color: theme.colors.success }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
|
|
1770
|
-
}
|
|
1771
|
-
)
|
|
1772
|
-
]
|
|
1773
|
-
}
|
|
1774
|
-
);
|
|
1775
|
-
};
|
|
1776
|
-
const RepositoryQualityEmptyState = ({ theme }) => {
|
|
1777
|
-
return /* @__PURE__ */ jsxs(
|
|
1778
|
-
"div",
|
|
1779
|
-
{
|
|
1780
|
-
style: {
|
|
1781
|
-
display: "flex",
|
|
1782
|
-
flexDirection: "column",
|
|
1783
|
-
alignItems: "center",
|
|
1784
|
-
justifyContent: "center",
|
|
1785
|
-
padding: 40,
|
|
1786
|
-
gap: 24,
|
|
1787
|
-
height: "100%",
|
|
1788
|
-
minHeight: 400
|
|
1789
|
-
},
|
|
1790
|
-
children: [
|
|
1791
|
-
/* @__PURE__ */ jsx(
|
|
1792
|
-
"div",
|
|
1793
|
-
{
|
|
1794
|
-
style: {
|
|
1795
|
-
display: "flex",
|
|
1796
|
-
alignItems: "center",
|
|
1797
|
-
justifyContent: "center",
|
|
1798
|
-
width: 64,
|
|
1799
|
-
height: 64,
|
|
1800
|
-
borderRadius: 16,
|
|
1801
|
-
backgroundColor: theme.colors.surface,
|
|
1802
|
-
border: `1px solid ${theme.colors.border}`
|
|
1803
|
-
},
|
|
1804
|
-
children: /* @__PURE__ */ jsx(Hexagon, { size: 32, color: theme.colors.textMuted })
|
|
1805
|
-
}
|
|
1806
|
-
),
|
|
1807
|
-
/* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: 400 }, children: [
|
|
1808
|
-
/* @__PURE__ */ jsx(
|
|
1809
|
-
"h3",
|
|
1810
|
-
{
|
|
1811
|
-
style: {
|
|
1812
|
-
margin: "0 0 8px 0",
|
|
1813
|
-
fontSize: 18,
|
|
1814
|
-
fontWeight: 600,
|
|
1815
|
-
color: theme.colors.text
|
|
1816
|
-
},
|
|
1817
|
-
children: "No Quality Metrics"
|
|
1818
|
-
}
|
|
1819
|
-
),
|
|
1820
|
-
/* @__PURE__ */ jsx(
|
|
1821
|
-
"p",
|
|
1822
|
-
{
|
|
1823
|
-
style: {
|
|
1824
|
-
margin: 0,
|
|
1825
|
-
fontSize: 14,
|
|
1826
|
-
color: theme.colors.textMuted,
|
|
1827
|
-
lineHeight: 1.5
|
|
1828
|
-
},
|
|
1829
|
-
children: "Configure the Quality Lens GitHub Action on your repositories to track code quality metrics across your projects."
|
|
1830
|
-
}
|
|
1831
|
-
)
|
|
1832
|
-
] }),
|
|
1833
|
-
/* @__PURE__ */ jsxs(
|
|
1834
|
-
"div",
|
|
1835
|
-
{
|
|
1836
|
-
style: {
|
|
1837
|
-
display: "flex",
|
|
1838
|
-
flexDirection: "column",
|
|
1839
|
-
gap: 16,
|
|
1840
|
-
padding: 20,
|
|
1841
|
-
borderRadius: 8,
|
|
1842
|
-
backgroundColor: theme.colors.surface,
|
|
1843
|
-
border: `1px solid ${theme.colors.border}`,
|
|
1844
|
-
width: "100%",
|
|
1845
|
-
maxWidth: 400
|
|
1846
|
-
},
|
|
1847
|
-
children: [
|
|
1848
|
-
/* @__PURE__ */ jsxs(
|
|
1849
|
-
"div",
|
|
1850
|
-
{
|
|
1851
|
-
style: {
|
|
1852
|
-
display: "flex",
|
|
1853
|
-
alignItems: "center",
|
|
1854
|
-
gap: 10,
|
|
1855
|
-
marginBottom: 4
|
|
1856
|
-
},
|
|
1857
|
-
children: [
|
|
1858
|
-
/* @__PURE__ */ jsx(Terminal, { size: 20, color: theme.colors.text }),
|
|
1859
|
-
/* @__PURE__ */ jsx(
|
|
1860
|
-
"h4",
|
|
1861
|
-
{
|
|
1862
|
-
style: {
|
|
1863
|
-
margin: 0,
|
|
1864
|
-
fontSize: 15,
|
|
1865
|
-
fontWeight: 600,
|
|
1866
|
-
color: theme.colors.text
|
|
1867
|
-
},
|
|
1868
|
-
children: "Get Started"
|
|
1869
|
-
}
|
|
1870
|
-
)
|
|
1871
|
-
]
|
|
1872
|
-
}
|
|
1873
|
-
),
|
|
1874
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1875
|
-
/* @__PURE__ */ jsxs(
|
|
1876
|
-
"div",
|
|
1877
|
-
{
|
|
1878
|
-
style: {
|
|
1879
|
-
display: "flex",
|
|
1880
|
-
alignItems: "center",
|
|
1881
|
-
gap: 8,
|
|
1882
|
-
marginBottom: 8,
|
|
1883
|
-
fontSize: 13,
|
|
1884
|
-
color: theme.colors.textMuted
|
|
1885
|
-
},
|
|
1886
|
-
children: [
|
|
1887
|
-
/* @__PURE__ */ jsx(
|
|
1888
|
-
"span",
|
|
1889
|
-
{
|
|
1890
|
-
style: {
|
|
1891
|
-
display: "flex",
|
|
1892
|
-
alignItems: "center",
|
|
1893
|
-
justifyContent: "center",
|
|
1894
|
-
width: 20,
|
|
1895
|
-
height: 20,
|
|
1896
|
-
borderRadius: "50%",
|
|
1897
|
-
backgroundColor: theme.colors.primary,
|
|
1898
|
-
color: theme.colors.background,
|
|
1899
|
-
fontSize: 11,
|
|
1900
|
-
fontWeight: 600
|
|
1901
|
-
},
|
|
1902
|
-
children: "1"
|
|
1903
|
-
}
|
|
1904
|
-
),
|
|
1905
|
-
/* @__PURE__ */ jsx("span", { children: "Install the CLI" })
|
|
1906
|
-
]
|
|
1907
|
-
}
|
|
1908
|
-
),
|
|
1909
|
-
/* @__PURE__ */ jsx(
|
|
1910
|
-
CommandLine,
|
|
1911
|
-
{
|
|
1912
|
-
command: "npm install -g @principal-ai/quality-lens-cli",
|
|
1913
|
-
theme
|
|
1914
|
-
}
|
|
1915
|
-
)
|
|
1916
|
-
] }),
|
|
1917
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1918
|
-
/* @__PURE__ */ jsxs(
|
|
1919
|
-
"div",
|
|
1920
|
-
{
|
|
1921
|
-
style: {
|
|
1922
|
-
display: "flex",
|
|
1923
|
-
alignItems: "center",
|
|
1924
|
-
gap: 8,
|
|
1925
|
-
marginBottom: 8,
|
|
1926
|
-
fontSize: 13,
|
|
1927
|
-
color: theme.colors.textMuted
|
|
1928
|
-
},
|
|
1929
|
-
children: [
|
|
1930
|
-
/* @__PURE__ */ jsx(
|
|
1931
|
-
"span",
|
|
1932
|
-
{
|
|
1933
|
-
style: {
|
|
1934
|
-
display: "flex",
|
|
1935
|
-
alignItems: "center",
|
|
1936
|
-
justifyContent: "center",
|
|
1937
|
-
width: 20,
|
|
1938
|
-
height: 20,
|
|
1939
|
-
borderRadius: "50%",
|
|
1940
|
-
backgroundColor: theme.colors.primary,
|
|
1941
|
-
color: theme.colors.background,
|
|
1942
|
-
fontSize: 11,
|
|
1943
|
-
fontWeight: 600
|
|
1944
|
-
},
|
|
1945
|
-
children: "2"
|
|
1946
|
-
}
|
|
1947
|
-
),
|
|
1948
|
-
/* @__PURE__ */ jsx("span", { children: "Initialize in each repository" })
|
|
1949
|
-
]
|
|
1950
|
-
}
|
|
1951
|
-
),
|
|
1952
|
-
/* @__PURE__ */ jsx(CommandLine, { command: "quality-lens init", theme })
|
|
1953
|
-
] }),
|
|
1954
|
-
/* @__PURE__ */ jsxs(
|
|
1955
|
-
"div",
|
|
1956
|
-
{
|
|
1957
|
-
style: {
|
|
1958
|
-
display: "flex",
|
|
1959
|
-
alignItems: "center",
|
|
1960
|
-
gap: 6,
|
|
1961
|
-
paddingTop: 8,
|
|
1962
|
-
fontSize: 13,
|
|
1963
|
-
color: theme.colors.textMuted
|
|
1964
|
-
},
|
|
1965
|
-
children: [
|
|
1966
|
-
/* @__PURE__ */ jsx(ChevronRight, { size: 14 }),
|
|
1967
|
-
/* @__PURE__ */ jsx("span", { children: "Commit, push, and quality data will appear after CI runs" })
|
|
1968
|
-
]
|
|
1969
|
-
}
|
|
1970
|
-
)
|
|
1971
|
-
]
|
|
1972
|
-
}
|
|
1973
|
-
)
|
|
1974
|
-
]
|
|
1975
|
-
}
|
|
1976
|
-
);
|
|
1977
|
-
};
|
|
1978
1868
|
const RepositoryQualityGridPanelContent = ({
|
|
1979
1869
|
context,
|
|
1980
1870
|
events
|
|
@@ -2053,7 +1943,7 @@ const RepositoryQualityGridPanelContent = ({
|
|
|
2053
1943
|
},
|
|
2054
1944
|
children: "Loading repository quality metrics..."
|
|
2055
1945
|
}
|
|
2056
|
-
) : repositories.length === 0 ? /* @__PURE__ */ jsx(
|
|
1946
|
+
) : repositories.length === 0 ? /* @__PURE__ */ jsx(QualityEmptyState, { theme, hasWorkflow: false }) : /* @__PURE__ */ jsx(
|
|
2057
1947
|
RepositoryQualityGrid,
|
|
2058
1948
|
{
|
|
2059
1949
|
repositories,
|