@kb-labs/quality-entry 2.119.0-canary.e120bc0ee → 2.119.0

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.
Files changed (58) hide show
  1. package/dist/cli/commands/build-order.js.map +1 -1
  2. package/dist/cli/commands/check-builds.js.map +1 -1
  3. package/dist/cli/commands/check-layers.js.map +1 -1
  4. package/dist/cli/commands/check-tests.js.map +1 -1
  5. package/dist/cli/commands/check-types.js.map +1 -1
  6. package/dist/cli/commands/context.js.map +1 -1
  7. package/dist/cli/commands/coupling.js.map +1 -1
  8. package/dist/cli/commands/cycles.js.map +1 -1
  9. package/dist/cli/commands/dead-code.js.map +1 -1
  10. package/dist/cli/commands/fix-deps.js.map +1 -1
  11. package/dist/cli/commands/flags.js.map +1 -1
  12. package/dist/cli/commands/gate.js.map +1 -1
  13. package/dist/cli/commands/health.js.map +1 -1
  14. package/dist/cli/commands/history.js.map +1 -1
  15. package/dist/cli/commands/index.js.map +1 -1
  16. package/dist/cli/commands/snapshot.js.map +1 -1
  17. package/dist/cli/commands/stats.js.map +1 -1
  18. package/dist/cli/commands/visualize.js.map +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/manifest.js.map +1 -1
  21. package/dist/rest/handlers/build-order-handler.js.map +1 -1
  22. package/dist/rest/handlers/builds-handler.js.map +1 -1
  23. package/dist/rest/handlers/coupling-handler.js.map +1 -1
  24. package/dist/rest/handlers/cycles-handler.js.map +1 -1
  25. package/dist/rest/handlers/dependencies-handler.js.map +1 -1
  26. package/dist/rest/handlers/graph-handler.js.map +1 -1
  27. package/dist/rest/handlers/health-handler.js.map +1 -1
  28. package/dist/rest/handlers/history-handler.js.map +1 -1
  29. package/dist/rest/handlers/knip-handler.js.map +1 -1
  30. package/dist/rest/handlers/layers-handler.js.map +1 -1
  31. package/dist/rest/handlers/snapshot-handler.js.map +1 -1
  32. package/dist/rest/handlers/stale-handler.js.map +1 -1
  33. package/dist/rest/handlers/stats-handler.js.map +1 -1
  34. package/dist/rest/handlers/tests-handler.js.map +1 -1
  35. package/dist/rest/handlers/types-handler.js.map +1 -1
  36. package/package.json +8 -8
  37. package/dist/manifest.json +0 -1394
  38. package/dist/widgets/117.js +0 -32
  39. package/dist/widgets/165.js +0 -1
  40. package/dist/widgets/326.js +0 -1
  41. package/dist/widgets/370.js +0 -1
  42. package/dist/widgets/405.js +0 -1
  43. package/dist/widgets/46.js +0 -445
  44. package/dist/widgets/50.js +0 -1
  45. package/dist/widgets/546.js +0 -1
  46. package/dist/widgets/648.js +0 -1
  47. package/dist/widgets/669.js +0 -1
  48. package/dist/widgets/707.js +0 -1
  49. package/dist/widgets/775.js +0 -1
  50. package/dist/widgets/78.js +0 -1
  51. package/dist/widgets/832.js +0 -96
  52. package/dist/widgets/875.js +0 -25
  53. package/dist/widgets/945.js +0 -1
  54. package/dist/widgets/968.js +0 -9
  55. package/dist/widgets/__federation_expose_QualityOverview.js +0 -1
  56. package/dist/widgets/mf-manifest.json +0 -229
  57. package/dist/widgets/mf-stats.json +0 -253
  58. package/dist/widgets/remoteEntry.js +0 -7
@@ -1 +0,0 @@
1
- "use strict";(self.rspackChunk_kb_labs_quality_entry=self.rspackChunk_kb_labs_quality_entry||[]).push([[15],{6026(e,n){var l=Symbol.for("react.transitional.element");function t(e,n,t){var i=null;if(void 0!==t&&(i=""+t),void 0!==n.key&&(i=""+n.key),"key"in n)for(var r in t={},n)"key"!==r&&(t[r]=n[r]);else t=n;return{$$typeof:l,type:e,key:i,ref:void 0!==(n=t.ref)?n:null,props:t}}n.Fragment=Symbol.for("react.fragment"),n.jsx=t,n.jsxs=t},4552(e,n,l){e.exports=l(6026)},9586(e,n,l){l.r(n),l.d(n,{default:()=>U});var t=l(4552),i=l(92),r=l(5155),a=l(4519);function s(e){switch(e){case"A":return"green";case"B":return"blue";case"C":return"orange";case"D":return"red";case"F":return"volcano";default:return"default"}}function o(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return 0===e?null:(0,t.jsxs)("span",{style:{color:(n?e<0:e>0)?"#52c41a":"#ff4d4f",fontSize:12,marginLeft:4},children:[e>0?"▲":"▼"," ",Math.abs(e)]})}var c=[{key:"architecture",label:"Architecture",icon:"ApartmentOutlined"},{key:"typescript",label:"TypeScript",icon:"CodeOutlined"},{key:"deadCode",label:"Dead Code",icon:"DeleteOutlined"},{key:"depHygiene",label:"Dep Hygiene",icon:"NodeIndexOutlined"},{key:"testCoverage",label:"Test Coverage",icon:"CheckCircleOutlined"}];function d(){var e,n,l,i,d,u,p,g,y=(0,a.useData)("/v1/plugins/quality/stats"),h=y.data,f=y.isLoading,x=(0,a.useData)("/v1/plugins/quality/health"),m=x.data,v=x.isLoading,j=(0,a.useData)("/v1/plugins/quality/history"),I=j.data,b=j.isLoading;if(f||v||b)return(0,t.jsx)(r.UISkeleton,{active:!0,lines:8,style:{padding:"24px 0"}});var k=null==I?void 0:I.delta,U=null!=(n=null==I||null==(g=I.latest)?void 0:g.dimensions)?n:null==m?void 0:m.dimensions;return(0,t.jsxs)("div",{children:[(0,t.jsx)(r.UICard,{title:"Health Score",style:{marginBottom:24},children:(0,t.jsxs)(r.UIRow,{gutter:32,align:"middle",children:[(0,t.jsxs)(r.UICol,{span:8,style:{textAlign:"center"},children:[(0,t.jsx)(r.UIProgress,{type:"circle",percent:null!=(l=null==m?void 0:m.score)?l:0,size:160,status:(e=null==m?void 0:m.score)?e>=80?"success":e<60?"exception":"normal":"normal"}),(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsxs)(r.UITag,{color:s(null==m?void 0:m.grade),style:{fontSize:16,padding:"4px 12px"},children:["Grade ",null!=(i=null==m?void 0:m.grade)?i:"—"]}),k&&(0,t.jsxs)("div",{style:{marginTop:8,color:"#8c8c8c",fontSize:13},children:[o(k.score)," vs previous snapshot"]})]})]}),(0,t.jsx)(r.UICol,{span:16,children:(0,t.jsx)(r.UIRow,{gutter:[16,16],children:c.map(function(e){var n,l,i,a,o,c=e.key,d=e.label,u=e.icon,p=U?U[c]:void 0;return(0,t.jsx)(r.UICol,{span:12,children:(0,t.jsxs)(r.UICard,{size:"small",style:{borderRadius:8},children:[(0,t.jsxs)(r.UISpace,{children:[(0,t.jsx)(r.UIIcon,{name:u}),(0,t.jsx)("span",{style:{fontWeight:500},children:d}),(0,t.jsx)(r.UITag,{color:s(null==p?void 0:p.grade),children:null!=(n=null==p?void 0:p.grade)?n:"—"})]}),(0,t.jsx)(r.UIProgress,{percent:null!=(l=null==p?void 0:p.score)?l:0,size:"small",showInfo:!1,strokeColor:(null!=(i=null==p?void 0:p.score)?i:0)>=80?"#52c41a":(null!=(a=null==p?void 0:p.score)?a:0)>=60?"#faad14":"#ff4d4f",style:{marginTop:8}}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#8c8c8c",marginTop:4},children:[null!=(o=null==p?void 0:p.score)?o:0,"/100"]})]})},c)})})})]})}),k&&(0,t.jsx)(r.UIAlert,{variant:"info",showIcon:!0,icon:(0,t.jsx)(r.UIIcon,{name:"LineChartOutlined"}),message:"Changes since last snapshot",description:(0,t.jsx)(r.UIRow,{gutter:16,style:{marginTop:8},children:[{label:"Layering violations",value:-k.layeringViolations,invert:!0},{label:"Any count",value:-k.anyCount,invert:!0},{label:"Unused files",value:-k.unusedFiles,invert:!0},{label:"Unused deps",value:-k.unusedDeps,invert:!0},{label:"Avg instability",value:-k.avgInstability,invert:!0}].map(function(e){var n=e.label,l=e.value,i=e.invert;return(0,t.jsxs)(r.UICol,{children:[(0,t.jsxs)("span",{style:{color:"#8c8c8c"},children:[n,": "]}),o(l,i),0===l&&(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"—"})]},n)})}),style:{marginBottom:24}}),(0,t.jsx)(r.UICard,{styles:{body:{padding:"18px 24px"}},children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:24,flexWrap:"wrap"},children:[{label:"Packages",value:null!=(d=null==h?void 0:h.packages)?d:0},{label:"Lines of Code",value:null!=(u=null==h?void 0:h.loc)?u:0},{label:"Total Size",value:null!=(p=null==h?void 0:h.size)?p:"N/A"}].map(function(e,n){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:24},children:[n>0&&(0,t.jsx)("span",{style:{width:1,alignSelf:"stretch",background:"var(--border-primary)"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,t.jsx)("span",{style:{fontSize:20,fontWeight:700,fontFamily:"var(--font-heading)",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.01em"},children:e.value}),(0,t.jsx)("span",{style:{fontSize:13,color:"var(--text-tertiary)"},children:e.label})]})]},e.label)})})})]})}var u=[{title:"Package",dataIndex:"name",key:"name",render:function(e){return(0,t.jsx)("code",{style:{fontSize:12},children:e})},ellipsis:!0},{title:"Ca (afferent)",dataIndex:"afferent",key:"afferent",width:110,sorter:function(e,n){return e.afferent-n.afferent}},{title:"Ce (efferent)",dataIndex:"efferent",key:"efferent",width:110,sorter:function(e,n){return e.efferent-n.efferent}},{title:"Instability",dataIndex:"instability",key:"instability",width:110,defaultSortOrder:"descend",sorter:function(e,n){return e.instability-n.instability},render:function(e){return(0,t.jsx)(r.UITag,{color:e>=.8?"#ff4d4f":e>=.6?"#faad14":e>=.4?"#1677ff":"#52c41a",children:e.toFixed(2)})}}],p=[{title:"File",dataIndex:"file",key:"file",ellipsis:!0,render:function(e){return(0,t.jsx)("code",{style:{fontSize:11},children:e.replace(/^.*\/src\//,"src/")})}},{title:"From",key:"from",width:180,render:function(e,n){return(0,t.jsxs)(r.UISpace,{size:4,children:[(0,t.jsx)(r.UITag,{children:n.fromPackage}),(0,t.jsxs)("span",{style:{color:"#8c8c8c",fontSize:11},children:["L",n.fromLayer]})]})}},{title:"To",key:"to",width:180,render:function(e,n){return(0,t.jsxs)(r.UISpace,{size:4,children:[(0,t.jsx)(r.UITag,{color:"red",children:n.toPackage}),(0,t.jsxs)("span",{style:{color:"#8c8c8c",fontSize:11},children:["L",n.toLayer]})]})}},{title:"Import",dataIndex:"importSpecifier",key:"importSpecifier",ellipsis:!0,render:function(e){return(0,t.jsx)("code",{style:{fontSize:11},children:e})}}];function g(){var e,n,l,i,s,o,c,d=(0,a.useData)("/v1/plugins/quality/coupling"),g=d.data,y=d.isLoading,h=(0,a.useData)("/v1/plugins/quality/layers"),f=h.data,x=h.isLoading;if(y||x)return(0,t.jsx)(r.UISkeleton,{active:!0,lines:10,style:{padding:"24px 0"}});var m=(null!=(e=null==f?void 0:f.totalViolations)?e:0)>0;return(0,t.jsxs)("div",{children:[(0,t.jsx)(r.UICard,{styles:{body:{padding:"18px 24px"}},style:{marginBottom:24},children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:24,flexWrap:"wrap"},children:[{label:"Layering Violations",value:null!=(n=null==f?void 0:f.totalViolations)?n:0,color:m?"#ff4d4f":"#52c41a"},{label:"Avg Instability",value:(null!=(l=null==g?void 0:g.avgInstability)?l:0).toFixed(2)},{label:"Affected Packages",value:null!=(i=null==f||null==(c=f.affectedPackages)?void 0:c.length)?i:0}].map(function(e,n){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:24},children:[n>0&&(0,t.jsx)("span",{style:{width:1,alignSelf:"stretch",background:"var(--border-primary)"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,t.jsx)("span",{style:{fontSize:20,fontWeight:700,fontFamily:"var(--font-heading)",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.01em",color:e.color},children:e.value}),(0,t.jsx)("span",{style:{fontSize:13,color:"var(--text-tertiary)"},children:e.label})]})]},e.label)})})}),m&&(0,t.jsx)(r.UIAlert,{variant:"error",showIcon:!0,icon:(0,t.jsx)(r.UIIcon,{name:"WarningOutlined"}),message:"".concat(f.totalViolations," layering violation").concat(f.totalViolations>1?"s":""," detected"),description:"Lower-layer packages are importing from higher-layer packages, breaking the dependency rules.",style:{marginBottom:16}}),(0,t.jsx)(r.UICard,{title:"Layering Violations",style:{marginBottom:24},children:m?(0,t.jsx)(r.UITable,{dataSource:null!=(s=null==f?void 0:f.violations)?s:[],columns:p,rowKey:function(e){return"".concat(e.file,":").concat(e.importSpecifier)},size:"small",pagination:{pageSize:20}}):(0,t.jsx)(r.UIAlert,{variant:"success",showIcon:!0,icon:(0,t.jsx)(r.UIIcon,{name:"CheckCircleOutlined"}),message:"No layering violations — architecture is clean"})}),(0,t.jsx)(r.UICard,{title:"Package Coupling (Ca/Ce/Instability)",children:(0,t.jsx)(r.UITable,{dataSource:null!=(o=null==g?void 0:g.packages)?o:[],columns:u,rowKey:"name",size:"small",pagination:{pageSize:30}})})]})}var y=[{title:"File",dataIndex:"file",key:"file",ellipsis:!0,render:function(e){return(0,t.jsx)("code",{style:{fontSize:12},children:e})}}],h=[{title:"File",dataIndex:"file",key:"file",ellipsis:!0,render:function(e){return(0,t.jsx)("code",{style:{fontSize:12},children:e})}},{title:"Symbol",dataIndex:"symbol",key:"symbol",width:200,render:function(e){return(0,t.jsx)(r.UITag,{children:(0,t.jsx)("code",{children:e})})}}],f=[{title:"Package",dataIndex:"package",key:"package",render:function(e){return(0,t.jsx)("code",{style:{fontSize:12},children:e})}},{title:"Workspace",dataIndex:"workspace",key:"workspace",width:220,render:function(e){return(0,t.jsx)(r.UITag,{children:e})}}];function x(){var e,n,l,i,s,o,c,d,u,p,g,x,m,v=(0,a.useData)("/v1/plugins/quality/dead-code"),j=v.data,I=v.isLoading,b=(0,a.useData)("/v1/plugins/quality/health"),k=b.data,U=b.isLoading;if(I||U)return(0,t.jsx)(r.UISkeleton,{active:!0,lines:8,style:{padding:"24px 0"}});var S=null!=(e=null==k||null==(u=k.dimensions)||null==(d=u.typescript)?void 0:d.details)?e:[],C=null!=(n=null==k||null==(g=k.dimensions)||null==(p=g.typescript)?void 0:p.score)?n:100,w=null!=(l=null==k||null==(m=k.dimensions)||null==(x=m.typescript)?void 0:x.grade)?l:"A",z=(null!=(i=null==j?void 0:j.unusedFiles)?i:[]).map(function(e){return{key:e,file:e}}),T=(null!=(s=null==j?void 0:j.unusedExports)?s:[]).map(function(e){return{key:"".concat(e.file,":").concat(e.symbol),file:e.file,symbol:e.symbol}}),A=(null!=(o=null==j?void 0:j.unusedDependencies)?o:[]).map(function(e){return{key:"".concat(e.workspace,":").concat(e.package),package:e.package,workspace:e.workspace}}),D=(null!=(c=null==j?void 0:j.unlistedDependencies)?c:[]).map(function(e){return{key:"".concat(e.workspace,":").concat(e.package),package:e.package,workspace:e.workspace}});return(0,t.jsxs)("div",{children:[(0,t.jsx)(r.UICard,{styles:{body:{padding:"18px 24px"}},style:{marginBottom:24},children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:24,flexWrap:"wrap"},children:[{label:"TypeScript Score",value:"".concat(C,"/100"),tag:w},{label:"Unused Files",value:z.length,color:z.length>0?"#ff4d4f":"#52c41a"},{label:"Unused Exports",value:T.length,color:T.length>0?"#faad14":"#52c41a"},{label:"Dep Issues",value:A.length+D.length,color:A.length+D.length>0?"#faad14":"#52c41a"}].map(function(e,n){var l;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:24},children:[n>0&&(0,t.jsx)("span",{style:{width:1,alignSelf:"stretch",background:"var(--border-primary)"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[e.tag&&(0,t.jsx)(r.UITag,{color:null!=(l=({A:"green",B:"blue",C:"orange",D:"red",F:"volcano"})[e.tag])?l:"default",children:e.tag}),(0,t.jsx)("span",{style:{fontSize:20,fontWeight:700,fontFamily:"var(--font-heading)",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.01em",color:e.color},children:e.value}),(0,t.jsx)("span",{style:{fontSize:13,color:"var(--text-tertiary)"},children:e.label})]})]},e.label)})})}),S.length>0&&(0,t.jsx)(r.UICard,{title:"TypeScript Health",style:{marginBottom:24},children:S.map(function(e,n){return(0,t.jsx)(r.UIAlert,{variant:C<60?"error":C<80?"warning":"info",showIcon:!0,message:e,style:{marginBottom:8}},n)})}),z.length>0&&(0,t.jsx)(r.UICard,{title:(0,t.jsxs)(r.UISpace,{children:[(0,t.jsx)(r.UIIcon,{name:"FileUnknownOutlined"}),(0,t.jsx)("span",{children:"Unused Files"}),(0,t.jsx)(r.UITag,{color:"red",children:z.length})]}),style:{marginBottom:16},children:(0,t.jsx)(r.UITable,{dataSource:z,columns:y,size:"small",pagination:{pageSize:20}})}),T.length>0&&(0,t.jsx)(r.UICard,{title:(0,t.jsxs)(r.UISpace,{children:[(0,t.jsx)(r.UIIcon,{name:"ExportOutlined"}),(0,t.jsx)("span",{children:"Unused Exports"}),(0,t.jsx)(r.UITag,{color:"orange",children:T.length})]}),style:{marginBottom:16},children:(0,t.jsx)(r.UITable,{dataSource:T,columns:h,size:"small",pagination:{pageSize:20}})}),A.length>0&&(0,t.jsx)(r.UICard,{title:(0,t.jsxs)(r.UISpace,{children:[(0,t.jsx)(r.UIIcon,{name:"NodeCollapseOutlined"}),(0,t.jsx)("span",{children:"Unused Dependencies"}),(0,t.jsx)(r.UITag,{color:"orange",children:A.length})]}),style:{marginBottom:16},children:(0,t.jsx)(r.UITable,{dataSource:A,columns:f,size:"small",pagination:{pageSize:20}})}),D.length>0&&(0,t.jsx)(r.UICard,{title:(0,t.jsxs)(r.UISpace,{children:[(0,t.jsx)(r.UIIcon,{name:"WarningOutlined"}),(0,t.jsx)("span",{children:"Unlisted Dependencies"}),(0,t.jsx)(r.UITag,{color:"red",children:D.length})]}),children:(0,t.jsx)(r.UITable,{dataSource:D,columns:f,size:"small",pagination:{pageSize:20}})}),0===z.length&&0===T.length&&0===A.length&&0===D.length&&(0,t.jsx)(r.UIAlert,{variant:"success",showIcon:!0,icon:(0,t.jsx)(r.UIIcon,{name:"CheckCircleOutlined"}),message:"No dead code detected — codebase is clean"})]})}function m(e){var n;return null!=(n=({A:"green",B:"blue",C:"orange",D:"red",F:"volcano"})[null!=e?e:""])?n:"default"}function v(e){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return 0===e?(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"—"}):(0,t.jsxs)("span",{style:{color:(n?e<0:e>0)?"#52c41a":"#ff4d4f"},children:[e>0?"▲":"▼"," ",Math.abs(e)]})}var j=[{title:"Date",dataIndex:"timestamp",key:"timestamp",width:170,render:function(e){return new Date(e).toLocaleString()}},{title:"Score",dataIndex:"score",key:"score",width:80,sorter:function(e,n){return e.score-n.score}},{title:"Grade",dataIndex:"grade",key:"grade",width:70,render:function(e){return(0,t.jsx)(r.UITag,{color:m(e),children:e})}},{title:"Architecture",key:"arch",width:110,render:function(e,n){return(0,t.jsxs)(r.UISpace,{size:4,children:[(0,t.jsx)(r.UITag,{color:m(n.dimensions.architecture.grade),style:{fontSize:11},children:n.dimensions.architecture.grade}),(0,t.jsx)("span",{style:{fontSize:11,color:"#8c8c8c"},children:n.dimensions.architecture.score})]})}},{title:"TypeScript",key:"ts",width:110,render:function(e,n){return(0,t.jsxs)(r.UISpace,{size:4,children:[(0,t.jsx)(r.UITag,{color:m(n.dimensions.typescript.grade),style:{fontSize:11},children:n.dimensions.typescript.grade}),(0,t.jsx)("span",{style:{fontSize:11,color:"#8c8c8c"},children:n.dimensions.typescript.score})]})}},{title:"Dead Code",key:"dc",width:110,render:function(e,n){return(0,t.jsxs)(r.UISpace,{size:4,children:[(0,t.jsx)(r.UITag,{color:m(n.dimensions.deadCode.grade),style:{fontSize:11},children:n.dimensions.deadCode.grade}),(0,t.jsx)("span",{style:{fontSize:11,color:"#8c8c8c"},children:n.dimensions.deadCode.score})]})}},{title:"Violations",key:"violations",width:95,render:function(e,n){return(0,t.jsx)("span",{style:{color:n.counters.layeringViolations>0?"#ff4d4f":"#52c41a"},children:n.counters.layeringViolations})}},{title:"Any",key:"any",width:70,render:function(e,n){return n.counters.anyCount}},{title:"Unused",key:"unused",width:80,render:function(e,n){return n.counters.unusedFiles}},{title:"Branch",key:"branch",width:120,ellipsis:!0,render:function(e,n){return(0,t.jsx)("code",{style:{fontSize:11},children:n.git.branch||"—"})}},{title:"Commit",key:"commit",width:90,render:function(e,n){return(0,t.jsx)("code",{style:{fontSize:11},children:n.git.commit?n.git.commit.slice(0,7):"—"})}}];function I(){var e,n=(0,a.useData)("/v1/plugins/quality/history"),l=n.data,i=n.isLoading,s=n.refetch,o=(0,a.useMutateData)("/v1/plugins/quality/snapshot"),c=(0,a.useNotification)();if(i)return(0,t.jsx)(r.UISkeleton,{active:!0,lines:8,style:{padding:"24px 0"}});var d=null!=(e=null==l?void 0:l.snapshots)?e:[],u=null==l?void 0:l.delta,p=u&&Object.values(u).some(function(e){return 0!==e});return(0,t.jsxs)("div",{children:[u&&(0,t.jsx)(r.UICard,{title:"Changes since last snapshot",style:{marginBottom:24},children:p?(0,t.jsxs)("div",{style:{display:"flex",gap:32,flexWrap:"wrap"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Score "}),v(u.score,!1)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Violations "}),v(u.layeringViolations)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Any count "}),v(u.anyCount)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Ts-ignore "}),v(u.tsIgnoreCount)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Unused files "}),v(u.unusedFiles)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Unused deps "}),v(u.unusedDeps)]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#8c8c8c"},children:"Avg instability "}),v(parseFloat(u.avgInstability.toFixed(2)))]})]}):(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:13},children:"No changes since last snapshot"})}),(0,t.jsx)(r.UICard,{title:"Snapshot History (".concat(d.length,")"),extra:(0,t.jsx)(r.UIButton,{size:"small",icon:(0,t.jsx)(r.UIIcon,{name:"CameraOutlined"}),loading:o.isLoading,onClick:function(){o.mutate({},{onSuccess:function(){c.success("Snapshot saved"),s()},onError:function(e){var n;c.error("Failed: ".concat((null!=(n=Error)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.message:String(e)))}})},children:"Save Snapshot"}),children:0===d.length?(0,t.jsx)(r.UIAlert,{variant:"info",showIcon:!0,icon:(0,t.jsx)(r.UIIcon,{name:"InfoCircleOutlined"}),message:"No snapshots yet",description:'Run "kb quality snapshot" or click "Save Snapshot" to start tracking trends.'}):(0,t.jsx)(r.UITable,{dataSource:d.slice().reverse(),columns:j,rowKey:"id",size:"small",pagination:{pageSize:20},scroll:{x:1200}})})]})}function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var l=0,t=Array(n);l<n;l++)t[l]=e[l];return t}function k(){var e,n,l,s,o=function(e){if(Array.isArray(e))return e}(e=i.useState())||function(e){var n,l,t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i=[],r=!0,a=!1;try{for(t=t.call(e);!(r=(n=t.next()).done)&&(i.push(n.value),2!==i.length);r=!0);}catch(e){a=!0,l=e}finally{try{r||null==t.return||t.return()}finally{if(a)throw l}}return i}}(e)||function(e){if(e){if("string"==typeof e)return b(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=o[0],d=o[1],u=c?"/v1/plugins/quality/build-order?package=".concat(encodeURIComponent(c)):"/v1/plugins/quality/build-order",p=(0,a.useData)(u),g=p.data,y=p.isLoading,h=p.isError;if((0,a.useData)("/v1/plugins/quality/cycles").data,y)return(0,t.jsx)(r.UISkeleton,{active:!0,lines:6,style:{padding:"24px 0"}});if(h)return(0,t.jsx)(r.UIAlert,{message:"Failed to load build order",variant:"error",showIcon:!0});var f=[{title:"Layer",dataIndex:"layer",key:"layer",width:100,render:function(e){return(0,t.jsxs)(r.UITag,{color:"blue",children:["Layer ",e]})}},{title:"Packages (can build in parallel)",dataIndex:"packages",key:"packages",render:function(e){return(0,t.jsx)(r.UISpace,{wrap:!0,children:e.map(function(e){return(0,t.jsx)(r.UITag,{children:e},e)})})}}],x=null==g?void 0:g.layers.map(function(e,n){return{layer:n+1,packages:e,key:n}});return(0,t.jsxs)("div",{children:[(null==g?void 0:g.hasCircular)&&(0,t.jsx)(r.UIAlert,{message:"Circular Dependencies Detected!",description:"Found ".concat(g.circular.length," circular dependency cycles. Build order may not be correct."),variant:"error",showIcon:!0,style:{marginBottom:24}}),(0,t.jsx)(r.UICard,{title:"Filter",style:{marginBottom:24},children:(0,t.jsx)(r.UISelect,{style:{width:400},placeholder:"Select package to see its build dependencies",value:c,onChange:function(e){return d(e)},allowClear:!0,showSearch:!0,options:null!=(n=null==g?void 0:g.sorted.map(function(e){return{label:e,value:e}}))?n:[]})}),(0,t.jsx)(r.UICard,{title:"Build Layers (".concat(null!=(l=null==g?void 0:g.layerCount)?l:0," layers, ").concat(null!=(s=null==g?void 0:g.packageCount)?s:0," packages)"),style:{marginBottom:24},children:(0,t.jsx)(r.UITable,{dataSource:null!=x?x:[],columns:f,pagination:!1,expandable:{expandedRowRender:function(e){return(0,t.jsxs)("div",{style:{padding:"8px 0"},children:[(0,t.jsx)("strong",{children:"Packages in this layer:"}),(0,t.jsx)("div",{style:{marginTop:8},children:e.packages.map(function(e){return(0,t.jsx)(r.UITag,{style:{marginBottom:4},children:e},e)})})]})}}})}),(null==g?void 0:g.hasCircular)&&(0,t.jsx)(r.UICard,{title:"Circular Dependencies (".concat(g.circular.length,")"),children:g.circular.map(function(e,n){return(0,t.jsx)(r.UIAlert,{message:"Cycle ".concat(n+1),description:e.join(" → "),variant:"warning",showIcon:!0,style:{marginBottom:12}},n)})})]})}function U(){var e=(0,t.jsx)(r.UITabs,{syncUrl:"search",items:[{key:"overview",label:"Overview",children:(0,t.jsx)(d,{})},{key:"architecture",label:"Architecture",children:(0,t.jsx)(g,{})},{key:"debt",label:"Debt",children:(0,t.jsx)(x,{})},{key:"history",label:"History",children:(0,t.jsx)(I,{})},{key:"build-order",label:"Build Order",children:(0,t.jsx)(k,{})}]});return(0,t.jsx)(r.UIPage,{children:(0,t.jsx)(r.UIPageHeader,{title:"Quality",description:"Code health, architecture analysis, and trend tracking",tabs:e})})}}}]);
@@ -1,229 +0,0 @@
1
- {
2
- "id": "qualityPlugin",
3
- "name": "qualityPlugin",
4
- "metaData": {
5
- "name": "qualityPlugin",
6
- "globalName": "qualityPlugin",
7
- "buildInfo": {
8
- "buildVersion": "2.119.0-canary.e120bc0ee",
9
- "buildName": "@kb-labs/quality-entry"
10
- },
11
- "publicPath": "auto",
12
- "remoteEntry": {
13
- "name": "remoteEntry.js",
14
- "path": "",
15
- "type": "global"
16
- },
17
- "types": {
18
- "path": "",
19
- "name": "",
20
- "zip": "",
21
- "api": ""
22
- },
23
- "pluginVersion": "2.3.3",
24
- "prefetchInterface": false
25
- },
26
- "shared": [
27
- {
28
- "id": "qualityPlugin:@kb-labs/studio-event-bus",
29
- "name": "@kb-labs/studio-event-bus",
30
- "version": "2.119.0-canary.e120bc0ee",
31
- "singleton": true,
32
- "requiredVersion": "^2.0.0",
33
- "assets": {
34
- "js": {
35
- "sync": [
36
- "50.js",
37
- "669.js"
38
- ],
39
- "async": []
40
- },
41
- "css": {
42
- "sync": [],
43
- "async": []
44
- }
45
- }
46
- },
47
- {
48
- "id": "qualityPlugin:@kb-labs/studio-ui-core",
49
- "name": "@kb-labs/studio-ui-core",
50
- "version": "2.119.0-canary.e120bc0ee",
51
- "singleton": true,
52
- "requiredVersion": "^2.0.0",
53
- "assets": {
54
- "js": {
55
- "sync": [
56
- "968.js"
57
- ],
58
- "async": []
59
- },
60
- "css": {
61
- "sync": [],
62
- "async": []
63
- }
64
- }
65
- },
66
- {
67
- "id": "qualityPlugin:antd",
68
- "name": "antd",
69
- "version": "5.29.3",
70
- "singleton": true,
71
- "requiredVersion": "^5.21.0",
72
- "assets": {
73
- "js": {
74
- "sync": [
75
- "46.js",
76
- "648.js"
77
- ],
78
- "async": []
79
- },
80
- "css": {
81
- "sync": [],
82
- "async": []
83
- }
84
- }
85
- },
86
- {
87
- "id": "qualityPlugin:@kb-labs/studio-hooks",
88
- "name": "@kb-labs/studio-hooks",
89
- "version": "2.119.0-canary.e120bc0ee",
90
- "singleton": true,
91
- "requiredVersion": "^2.0.0",
92
- "assets": {
93
- "js": {
94
- "sync": [
95
- "370.js",
96
- "945.js"
97
- ],
98
- "async": []
99
- },
100
- "css": {
101
- "sync": [],
102
- "async": []
103
- }
104
- }
105
- },
106
- {
107
- "id": "qualityPlugin:@kb-labs/studio-ui-kit",
108
- "name": "@kb-labs/studio-ui-kit",
109
- "version": "2.119.0-canary.e120bc0ee",
110
- "singleton": true,
111
- "requiredVersion": "^2.0.0",
112
- "assets": {
113
- "js": {
114
- "sync": [
115
- "117.js",
116
- "326.js",
117
- "648.js",
118
- "832.js"
119
- ],
120
- "async": []
121
- },
122
- "css": {
123
- "sync": [],
124
- "async": []
125
- }
126
- }
127
- },
128
- {
129
- "id": "qualityPlugin:react",
130
- "name": "react",
131
- "version": "19.2.5",
132
- "singleton": true,
133
- "requiredVersion": "^19.0.0",
134
- "assets": {
135
- "js": {
136
- "sync": [
137
- "405.js"
138
- ],
139
- "async": []
140
- },
141
- "css": {
142
- "sync": [],
143
- "async": []
144
- }
145
- }
146
- },
147
- {
148
- "id": "qualityPlugin:react-dom",
149
- "name": "react-dom",
150
- "version": "19.2.5",
151
- "singleton": true,
152
- "requiredVersion": "^19.0.0",
153
- "assets": {
154
- "js": {
155
- "sync": [
156
- "165.js",
157
- "546.js"
158
- ],
159
- "async": []
160
- },
161
- "css": {
162
- "sync": [],
163
- "async": []
164
- }
165
- }
166
- },
167
- {
168
- "id": "qualityPlugin:@tanstack/react-query",
169
- "name": "@tanstack/react-query",
170
- "version": "5.97.0",
171
- "singleton": true,
172
- "requiredVersion": "^5.0.0",
173
- "assets": {
174
- "js": {
175
- "sync": [
176
- "707.js",
177
- "78.js"
178
- ],
179
- "async": []
180
- },
181
- "css": {
182
- "sync": [],
183
- "async": []
184
- }
185
- }
186
- },
187
- {
188
- "id": "qualityPlugin:react-router-dom",
189
- "name": "react-router-dom",
190
- "version": "7.18.1",
191
- "singleton": true,
192
- "requiredVersion": "^7.0.0",
193
- "assets": {
194
- "js": {
195
- "sync": [
196
- "875.js"
197
- ],
198
- "async": []
199
- },
200
- "css": {
201
- "sync": [],
202
- "async": []
203
- }
204
- }
205
- }
206
- ],
207
- "remotes": [],
208
- "exposes": [
209
- {
210
- "id": "qualityPlugin:QualityOverview",
211
- "name": "QualityOverview",
212
- "assets": {
213
- "js": {
214
- "sync": [
215
- "__federation_expose_QualityOverview.js"
216
- ],
217
- "async": [
218
- "775.js"
219
- ]
220
- },
221
- "css": {
222
- "sync": [],
223
- "async": []
224
- }
225
- },
226
- "path": "./QualityOverview"
227
- }
228
- ]
229
- }
@@ -1,253 +0,0 @@
1
- {
2
- "id": "qualityPlugin",
3
- "name": "qualityPlugin",
4
- "metaData": {
5
- "name": "qualityPlugin",
6
- "globalName": "qualityPlugin",
7
- "buildInfo": {
8
- "buildVersion": "2.119.0-canary.e120bc0ee",
9
- "buildName": "@kb-labs/quality-entry"
10
- },
11
- "publicPath": "auto",
12
- "remoteEntry": {
13
- "name": "remoteEntry.js",
14
- "path": "",
15
- "type": "global"
16
- },
17
- "types": {
18
- "path": "",
19
- "name": "",
20
- "zip": "",
21
- "api": ""
22
- },
23
- "pluginVersion": "2.3.3",
24
- "prefetchInterface": false
25
- },
26
- "shared": [
27
- {
28
- "id": "qualityPlugin:@kb-labs/studio-event-bus",
29
- "name": "@kb-labs/studio-event-bus",
30
- "version": "2.119.0-canary.e120bc0ee",
31
- "requiredVersion": "^2.0.0",
32
- "singleton": true,
33
- "assets": {
34
- "js": {
35
- "sync": [
36
- "50.js",
37
- "669.js"
38
- ],
39
- "async": []
40
- },
41
- "css": {
42
- "sync": [],
43
- "async": []
44
- }
45
- },
46
- "usedIn": [],
47
- "usedExports": []
48
- },
49
- {
50
- "id": "qualityPlugin:@kb-labs/studio-ui-core",
51
- "name": "@kb-labs/studio-ui-core",
52
- "version": "2.119.0-canary.e120bc0ee",
53
- "requiredVersion": "^2.0.0",
54
- "singleton": true,
55
- "assets": {
56
- "js": {
57
- "sync": [
58
- "968.js"
59
- ],
60
- "async": []
61
- },
62
- "css": {
63
- "sync": [],
64
- "async": []
65
- }
66
- },
67
- "usedIn": [],
68
- "usedExports": []
69
- },
70
- {
71
- "id": "qualityPlugin:antd",
72
- "name": "antd",
73
- "version": "5.29.3",
74
- "requiredVersion": "^5.21.0",
75
- "singleton": true,
76
- "assets": {
77
- "js": {
78
- "sync": [
79
- "46.js",
80
- "648.js"
81
- ],
82
- "async": []
83
- },
84
- "css": {
85
- "sync": [],
86
- "async": []
87
- }
88
- },
89
- "usedIn": [],
90
- "usedExports": []
91
- },
92
- {
93
- "id": "qualityPlugin:@kb-labs/studio-hooks",
94
- "name": "@kb-labs/studio-hooks",
95
- "version": "2.119.0-canary.e120bc0ee",
96
- "requiredVersion": "^2.0.0",
97
- "singleton": true,
98
- "assets": {
99
- "js": {
100
- "sync": [
101
- "370.js",
102
- "945.js"
103
- ],
104
- "async": []
105
- },
106
- "css": {
107
- "sync": [],
108
- "async": []
109
- }
110
- },
111
- "usedIn": [],
112
- "usedExports": []
113
- },
114
- {
115
- "id": "qualityPlugin:@kb-labs/studio-ui-kit",
116
- "name": "@kb-labs/studio-ui-kit",
117
- "version": "2.119.0-canary.e120bc0ee",
118
- "requiredVersion": "^2.0.0",
119
- "singleton": true,
120
- "assets": {
121
- "js": {
122
- "sync": [
123
- "117.js",
124
- "326.js",
125
- "648.js",
126
- "832.js"
127
- ],
128
- "async": []
129
- },
130
- "css": {
131
- "sync": [],
132
- "async": []
133
- }
134
- },
135
- "usedIn": [],
136
- "usedExports": []
137
- },
138
- {
139
- "id": "qualityPlugin:react",
140
- "name": "react",
141
- "version": "19.2.5",
142
- "requiredVersion": "^19.0.0",
143
- "singleton": true,
144
- "assets": {
145
- "js": {
146
- "sync": [
147
- "405.js"
148
- ],
149
- "async": []
150
- },
151
- "css": {
152
- "sync": [],
153
- "async": []
154
- }
155
- },
156
- "usedIn": [
157
- "src/studio/pages/QualityOverview.tsx"
158
- ],
159
- "usedExports": []
160
- },
161
- {
162
- "id": "qualityPlugin:react-dom",
163
- "name": "react-dom",
164
- "version": "19.2.5",
165
- "requiredVersion": "^19.0.0",
166
- "singleton": true,
167
- "assets": {
168
- "js": {
169
- "sync": [
170
- "165.js",
171
- "546.js"
172
- ],
173
- "async": []
174
- },
175
- "css": {
176
- "sync": [],
177
- "async": []
178
- }
179
- },
180
- "usedIn": [],
181
- "usedExports": []
182
- },
183
- {
184
- "id": "qualityPlugin:@tanstack/react-query",
185
- "name": "@tanstack/react-query",
186
- "version": "5.97.0",
187
- "requiredVersion": "^5.0.0",
188
- "singleton": true,
189
- "assets": {
190
- "js": {
191
- "sync": [
192
- "707.js",
193
- "78.js"
194
- ],
195
- "async": []
196
- },
197
- "css": {
198
- "sync": [],
199
- "async": []
200
- }
201
- },
202
- "usedIn": [],
203
- "usedExports": []
204
- },
205
- {
206
- "id": "qualityPlugin:react-router-dom",
207
- "name": "react-router-dom",
208
- "version": "7.18.1",
209
- "requiredVersion": "^7.0.0",
210
- "singleton": true,
211
- "assets": {
212
- "js": {
213
- "sync": [
214
- "875.js"
215
- ],
216
- "async": []
217
- },
218
- "css": {
219
- "sync": [],
220
- "async": []
221
- }
222
- },
223
- "usedIn": [],
224
- "usedExports": []
225
- }
226
- ],
227
- "remotes": [],
228
- "exposes": [
229
- {
230
- "path": "./QualityOverview",
231
- "file": "src/studio/pages/QualityOverview.tsx",
232
- "id": "qualityPlugin:QualityOverview",
233
- "name": "QualityOverview",
234
- "requires": [
235
- "react"
236
- ],
237
- "assets": {
238
- "js": {
239
- "sync": [
240
- "__federation_expose_QualityOverview.js"
241
- ],
242
- "async": [
243
- "775.js"
244
- ]
245
- },
246
- "css": {
247
- "sync": [],
248
- "async": []
249
- }
250
- }
251
- }
252
- ]
253
- }