@kb-labs/release-manager-cli 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 (77) hide show
  1. package/dist/cli/commands/build.js.map +1 -1
  2. package/dist/cli/commands/changelog.js.map +1 -1
  3. package/dist/cli/commands/checks.js.map +1 -1
  4. package/dist/cli/commands/deliver.js +2 -0
  5. package/dist/cli/commands/deliver.js.map +1 -1
  6. package/dist/cli/commands/git.js.map +1 -1
  7. package/dist/cli/commands/pack.js.map +1 -1
  8. package/dist/cli/commands/plan.js.map +1 -1
  9. package/dist/cli/commands/promote.js.map +1 -1
  10. package/dist/cli/commands/publish.js.map +1 -1
  11. package/dist/cli/commands/report.js.map +1 -1
  12. package/dist/cli/commands/rollback.js.map +1 -1
  13. package/dist/cli/commands/run.js.map +1 -1
  14. package/dist/cli/commands/stage-plan.d.ts +19 -0
  15. package/dist/cli/commands/stage-plan.js +525 -0
  16. package/dist/cli/commands/stage-plan.js.map +1 -0
  17. package/dist/cli/commands/stage.js.map +1 -1
  18. package/dist/cli/commands/status.d.ts +11 -0
  19. package/dist/cli/commands/status.js +130 -0
  20. package/dist/cli/commands/status.js.map +1 -0
  21. package/dist/cli/commands/verify-clean-install.d.ts +1 -0
  22. package/dist/cli/commands/verify-clean-install.js +1 -1
  23. package/dist/cli/commands/verify-clean-install.js.map +1 -1
  24. package/dist/cli/commands/verify.js.map +1 -1
  25. package/dist/cli/commands/version.js.map +1 -1
  26. package/dist/contracts/release.schema.js.map +1 -1
  27. package/dist/index.js +40 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/manifest.js +40 -2
  30. package/dist/manifest.js.map +1 -1
  31. package/dist/rest/handlers/build-handler.js.map +1 -1
  32. package/dist/rest/handlers/changelog-generate-handler.js.map +1 -1
  33. package/dist/rest/handlers/changelog-handler.js.map +1 -1
  34. package/dist/rest/handlers/changelog-save-handler.js.map +1 -1
  35. package/dist/rest/handlers/checklist-handler.js.map +1 -1
  36. package/dist/rest/handlers/generate-handler.js.map +1 -1
  37. package/dist/rest/handlers/get-checks-handler.js.map +1 -1
  38. package/dist/rest/handlers/git-timeline-handler.js.map +1 -1
  39. package/dist/rest/handlers/history-changelog-handler.js.map +1 -1
  40. package/dist/rest/handlers/history-handler.js.map +1 -1
  41. package/dist/rest/handlers/history-plan-handler.js.map +1 -1
  42. package/dist/rest/handlers/history-report-handler.js.map +1 -1
  43. package/dist/rest/handlers/plan-handler.js.map +1 -1
  44. package/dist/rest/handlers/preview-handler.js.map +1 -1
  45. package/dist/rest/handlers/report-handler.js.map +1 -1
  46. package/dist/rest/handlers/reset-handler.js.map +1 -1
  47. package/dist/rest/handlers/run-checks-handler.js.map +1 -1
  48. package/dist/rest/handlers/run-handler.js.map +1 -1
  49. package/dist/rest/handlers/scopes-handler.js.map +1 -1
  50. package/dist/rest/handlers/status-handler.js.map +1 -1
  51. package/dist/setup/handler.js.map +1 -1
  52. package/package.json +8 -8
  53. package/dist/manifest.json +0 -1210
  54. package/dist/widgets/117.js +0 -32
  55. package/dist/widgets/165.js +0 -1
  56. package/dist/widgets/326.js +0 -1
  57. package/dist/widgets/370.js +0 -1
  58. package/dist/widgets/405.js +0 -1
  59. package/dist/widgets/46.js +0 -445
  60. package/dist/widgets/50.js +0 -1
  61. package/dist/widgets/546.js +0 -1
  62. package/dist/widgets/648.js +0 -1
  63. package/dist/widgets/669.js +0 -1
  64. package/dist/widgets/707.js +0 -1
  65. package/dist/widgets/775.js +0 -1
  66. package/dist/widgets/78.js +0 -1
  67. package/dist/widgets/832.js +0 -96
  68. package/dist/widgets/875.js +0 -25
  69. package/dist/widgets/945.js +0 -1
  70. package/dist/widgets/968.js +0 -9
  71. package/dist/widgets/__federation_expose_ReleasePage.js +0 -1
  72. package/dist/widgets/mf-manifest.json +0 -229
  73. package/dist/widgets/mf-stats.json +0 -256
  74. package/dist/widgets/remoteEntry.js +0 -7
  75. package/dist/workflows/templates/dry-run.yaml +0 -37
  76. package/dist/workflows/templates/full-release.yaml +0 -58
  77. package/dist/workflows/templates/hotfix.yaml +0 -40
@@ -1 +0,0 @@
1
- "use strict";(self.rspackChunk_kb_labs_release_manager_cli=self.rspackChunk_kb_labs_release_manager_cli||[]).push([[135],{6026(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),"key"in t)for(var s in r={},t)"key"!==s&&(r[s]=t[s]);else r=t;return{$$typeof:n,type:e,key:a,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},4552(e,t,n){e.exports=n(6026)},7198(e,t,n){n.r(t),n.d(t,{default:()=>Q});var r=n(4552),a=n(92),s=n(5963),o=n(4519),l=n(5155);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n,r,a,s,o){try{var l=e[s](o),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);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 i(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){var t,n,s,i,d,p,h=e.selectedScope,y=e.selectedScopePath,f=e.onPlanReady,g=u(a.useState(!0),2),m=g[0],x=g[1],I=u(a.useState(!1),2),v=I[0],j=I[1],b=h?"/v1/plugins/release/status?scope=".concat(encodeURIComponent(h)):"",U=h?"/v1/plugins/release/plan?scope=".concat(encodeURIComponent(h)):"",S=h?"/v1/plugins/release/git-timeline?scope=".concat(encodeURIComponent(h)):"",k=(0,o.useData)(b),T=k.data,w=k.isLoading,C=k.refetch,E=(0,o.useData)(U),P=E.data,A=E.isLoading,R=E.refetch,O=(0,o.useData)(S).data,z=(0,o.useMutateData)("/v1/plugins/release/generate","POST"),M=z.mutateAsync,B=z.isLoading;a.useEffect(function(){f(!!((null==P?void 0:P.plan)&&P.plan.packages.length>0))},[P,f]);var D=function(){var e;return(e=function(){var e,t,n,r,a;return function(e,t){var n,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:i(0)}),l(o,"throw",{value:i(1)}),l(o,"return",{value:i(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,M({scope:h,scopePath:y,useLLM:m})];case 1:return e=s.sent(),C(),R(),t=e.confidence?Math.round(100*e.confidence):0,n=e.tokensUsed?", ".concat(e.tokensUsed," tokens"):"",r=m?"AI-powered":"Simple",l.UIMessage.success("".concat(r," plan generated (").concat(t,"% confidence").concat(n,")")),[3,3];case 2:var o;return a=s.sent(),l.UIMessage.error("Failed to generate plan: ".concat((null!=(o=Error)&&"u">typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](a):a instanceof o)?a.message:"Unknown error")),[3,3];case 3:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var s=e.apply(t,n);function o(e){c(s,r,a,o,l,"next",e)}function l(e){c(s,r,a,o,l,"throw",e)}o(void 0)})})()};if(w)return(0,r.jsx)(l.UISpin,{size:"large",style:{display:"block",margin:"48px auto"}});if(!(null==T?void 0:T.hasPlan)&&!(null==P?void 0:P.plan))return void 0===O||O.hasUnreleasedChanges?(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"No release plan generated yet",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE,children:(0,r.jsxs)(l.UISpace,{direction:"vertical",size:"middle",style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(l.UICheckbox,{checked:m,onChange:function(e){return x(e)},children:"Use AI-powered analysis (requires LLM)"}),(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"ThunderboltOutlined"}),onClick:function(){D()},loading:B,size:"large",children:"Generate Release Plan"}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:m?"AI will analyze git history and provide intelligent reasoning for version bumps":"Generate plan using conventional commits analysis"})]})})}):(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"No unreleased changes since ".concat(null!=(p=null==O?void 0:O.lastTag)?p:"last release"),image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})});if(A||!(null==P?void 0:P.plan))return(0,r.jsx)(l.UISpin,{size:"large",style:{display:"block",margin:"48px auto"}});var L=P.plan;if(0===L.packages.length)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"Plan exists but contains no packages",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE,children:(0,r.jsxs)(l.UISpace,{direction:"vertical",size:"middle",style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:"This may happen if there are no changes to release or the scope has no packages."}),(0,r.jsx)(l.UICheckbox,{checked:m,onChange:function(e){return x(e)},children:"Use AI-powered analysis"}),(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"ThunderboltOutlined"}),onClick:function(){D()},loading:B,children:"Regenerate Plan"})]})})});var N=[{title:"Package",dataIndex:"name",key:"name",width:280,ellipsis:!0,render:function(e){return(0,r.jsx)(l.UITypographyText,{strong:!0,ellipsis:{tooltip:e},children:e})}},{title:"Current",dataIndex:"currentVersion",key:"currentVersion",width:180,ellipsis:!0,render:function(e){return e?(0,r.jsx)(l.UITag,{color:"blue",title:e,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:e}):"-"}},{title:"Next",dataIndex:"nextVersion",key:"nextVersion",width:180,ellipsis:!0,render:function(e){return e?(0,r.jsx)(l.UITag,{color:"green",title:e,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:e}):"-"}},{title:"Bump",dataIndex:"bump",key:"bump",width:80,render:function(e){return e?(0,r.jsx)(l.UITag,{color:{major:"red",minor:"orange",patch:"blue"}[e]||"default",children:e}):"-"}},{title:"Reason",dataIndex:"reason",key:"reason",ellipsis:!0,render:function(e){return(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:e||"-"})}}];return(0,r.jsxs)(l.UICard,{title:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UIIcon,{name:"CheckCircleOutlined",style:{color:"#52c41a"}}),(0,r.jsx)("span",{children:"Release Plan Ready"}),(0,r.jsxs)(l.UITag,{color:"blue",children:[L.packages.length," package(s)"]})]}),extra:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UICheckbox,{checked:m,onChange:function(e){return x(e)},children:"Use AI"}),(0,r.jsx)(l.UIButton,{icon:(0,r.jsx)(l.UIIcon,{name:"ThunderboltOutlined"}),onClick:function(){D()},loading:B,size:"small",children:"Regenerate"})]}),children:[(null==O?void 0:O.hasUnreleasedChanges)&&(0,r.jsx)(l.UIAccordion,{size:"small",style:{marginBottom:16},defaultActiveKey:["timeline"],items:[{key:"timeline",label:"Git Timeline",extra:(0,r.jsx)(l.UISpace,{children:(0,r.jsxs)(l.UITag,{children:[O.unreleased," commits"]})}),children:(0,r.jsxs)(r.Fragment,{children:[O.suggestedVersion&&(0,r.jsx)(l.UIAlert,{variant:"success",style:{marginBottom:16},message:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsxs)(l.UITypographyText,{strong:!0,children:[O.currentVersion||"0.0.0"," → ",O.suggestedVersion]}),(0,r.jsx)(l.UITag,{color:"major"===O.suggestedBump?"red":"minor"===O.suggestedBump?"orange":"blue",children:O.suggestedBump})]})}),(0,r.jsx)(l.UITimeline,{mode:"left",items:(null!=(t=O.commits)?t:[]).slice(0,v?void 0:5).map(function(e){return{color:"feat"===e.type?"green":"fix"===e.type?"red":"BREAKING"===e.type?"volcano":"gray",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)(l.UISpace,{size:"small",children:[(0,r.jsx)(l.UITag,{color:"feat"===e.type?"green":"fix"===e.type?"red":"BREAKING"===e.type?"volcano":"default",style:{fontSize:10},children:e.type}),(0,r.jsx)(l.UITypographyText,{code:!0,style:{fontSize:10},children:e.shortSha})]}),(0,r.jsx)("div",{style:{marginTop:2},children:(0,r.jsx)(l.UITypographyText,{style:{fontSize:12},children:e.message})})]})}})}),(null!=(n=null==(i=O.commits)?void 0:i.length)?n:0)>5&&(0,r.jsx)(l.UIButton,{variant:"link",size:"small",icon:v?(0,r.jsx)(l.UIIcon,{name:"UpOutlined"}):(0,r.jsx)(l.UIIcon,{name:"DownOutlined"}),onClick:function(){return j(!v)},style:{padding:0},children:v?"Show less":"Show ".concat((null!=(s=null==(d=O.commits)?void 0:d.length)?s:0)-5," more")})]})}]}),(0,r.jsx)(l.UITable,{columns:N,dataSource:L.packages,rowKey:"name",pagination:!1,size:"small",scroll:{x:"max-content"}})]})}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r,a,s,o){try{var l=e[s](o),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var s=e.apply(t,n);function o(e){h(s,r,a,o,l,"next",e)}function l(e){h(s,r,a,o,l,"throw",e)}o(void 0)})}}function f(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);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 p(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){var n,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:i(0)}),l(o,"throw",{value:i(1)}),l(o,"return",{value:i(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function x(e){var t=e.selectedScope,n=e.onChangelogReady,s=(0,o.useTheme)().antdToken,i=g(a.useState(!0),2),c=i[0],u=i[1],d=g(a.useState(""),2),p=d[0],h=d[1],x=g(a.useState(!1),2),I=x[0],v=x[1],j=g(a.useState(!0),2),b=j[0],U=j[1],S=t?"/v1/plugins/release/changelog?scope=".concat(encodeURIComponent(t)):"",k=(0,o.useData)(S),T=k.data,w=k.isLoading,C=(0,o.useMutateData)("/v1/plugins/release/changelog/generate","POST"),E=C.mutateAsync,P=C.isLoading,A=(0,o.useMutateData)("/v1/plugins/release/changelog/save","POST"),R=A.mutateAsync,O=A.isLoading;a.useEffect(function(){(null==T?void 0:T.markdown)?h(T.markdown):h(""),v(!1)},[T]),a.useEffect(function(){n(!!(p&&!I))},[p,I,n]);var z=function(){return y(function(){var e,n,r,a,s;return m(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,E({scope:t,useLLM:b})];case 1:return h((e=o.sent()).markdown),v(!0),n=[],e.commitsCount&&n.push("".concat(e.commitsCount," commits")),e.tokensUsed&&n.push("".concat(e.tokensUsed," tokens")),r=e.usedLLM?"AI-enhanced":b?"Template":"Simple",a=n.length>0?" (".concat(n.join(", "),")"):"",l.UIMessage.success("".concat(r," changelog generated").concat(a)),[3,3];case 2:return s=o.sent(),l.UIMessage.error("Failed to generate changelog: ".concat(f(s,Error)?s.message:"Unknown error")),[3,3];case 3:return[2]}})})()};return w?(0,r.jsx)(l.UISpin,{size:"large",style:{display:"block",margin:"48px auto"}}):(null==T?void 0:T.markdown)||p?(0,r.jsxs)(l.UICard,{title:(0,r.jsxs)(l.UISpace,{children:[I?(0,r.jsx)(l.UITag,{color:"warning",children:"Unsaved"}):(0,r.jsx)(l.UITag,{color:"success",children:"Saved"}),(0,r.jsx)("span",{children:"Changelog"})]}),extra:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UICheckbox,{checked:b,onChange:function(e){return U(e)},children:"Use AI"}),(0,r.jsx)(l.UIButton,{icon:(0,r.jsx)(l.UIIcon,{name:"ThunderboltOutlined"}),onClick:function(){z()},loading:P,size:"small",children:"Regenerate"}),(0,r.jsx)(l.UIButton,{icon:c?(0,r.jsx)(l.UIIcon,{name:"EyeOutlined"}):(0,r.jsx)(l.UIIcon,{name:"EditOutlined"}),onClick:function(){return u(!c)},size:"small",children:c?"Preview":"Edit"}),(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"SaveOutlined"}),onClick:function(){y(function(){var e;return m(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,R({scope:t,markdown:p})];case 1:return n.sent(),v(!1),l.UIMessage.success("Changelog saved"),[3,3];case 2:return e=n.sent(),l.UIMessage.error("Failed to save: ".concat(f(e,Error)?e.message:"Unknown error")),[3,3];case 3:return[2]}})})()},loading:O,disabled:!I,size:"small",children:"Save"})]}),children:[(0,r.jsxs)(l.UIRow,{gutter:16,children:[(0,r.jsx)(l.UICol,{span:c?12:24,children:c?(0,r.jsx)(l.UIInputTextArea,{value:p,onChange:function(e){h(e.target.value),v(!0)},rows:20,style:{fontFamily:"monospace",fontSize:13,height:450},placeholder:"Write your changelog in Markdown..."}):(0,r.jsx)("div",{style:{maxHeight:500,overflow:"auto"},children:(0,r.jsx)(l.UIMarkdownViewer,{content:p})})}),c&&(0,r.jsx)(l.UICol,{span:12,children:(0,r.jsxs)("div",{style:{border:"1px solid ".concat(s.colorBorder),borderRadius:s.borderRadius,height:450,overflow:"auto",padding:12,background:s.colorFillTertiary},children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:11,display:"block",marginBottom:8},children:"Preview"}),(0,r.jsx)(l.UIMarkdownViewer,{content:p})]})})]}),I&&(0,r.jsx)("div",{style:{marginTop:16,textAlign:"center"},children:(0,r.jsx)(l.UITypographyText,{type:"warning",style:{fontSize:12},children:"Save changelog to proceed to the next step"})})]}):(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"No changelog generated yet",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE,children:(0,r.jsxs)(l.UISpace,{direction:"vertical",size:"middle",style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(l.UICheckbox,{checked:b,onChange:function(e){return U(e)},children:"Use AI-powered generation (requires LLM)"}),(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"ThunderboltOutlined"}),onClick:function(){z()},loading:P,size:"large",children:"Generate Changelog"}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:b?"AI will analyze git commits and generate a detailed changelog":"Generate a simple changelog from package versions"})]})})})}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,a,s,o){try{var l=e[s](o),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function j(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function b(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,t)).toFixed(1))," ").concat(["B","KB","MB","GB"][t])}function U(e){var t,n=e.split(".");return n.length>1&&null!=(t=n[n.length-1])?t:""}function S(e){switch(U(e)){case"js":case"mjs":case"cjs":return"#f5a623";case"ts":case"tsx":return"#3178c6";case"d.ts":return"#235a97";case"json":return"#5a9c5a";case"md":return"#083fa1";case"map":return"#8c8c8c";default:return"#595959"}}function k(e){var t,n,s=e.selectedScope,i=e.onPreviewReady,c=(0,o.useTheme)().antdToken,u=s?"/v1/plugins/release/preview?scope=".concat(encodeURIComponent(s)):"",d=(0,o.useData)(u),p=d.data,h=d.isLoading,y=d.error,f=d.refetch,g=(0,o.useMutateData)("/v1/plugins/release/build","POST"),m=g.mutateAsync,x=g.isLoading,k=null!=(t=null==p?void 0:p.packages.some(function(e){return"ready"!==e.buildStatus}))&&t,T=null!=(n=null==p?void 0:p.allBuilt)&&n;a.useEffect(function(){p&&p.packages.length>0&&T?i(!0):i(!1)},[p,T,i]);var w=function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:i(0)}),l(o,"throw",{value:i(1)}),l(o,"return",{value:i(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,m({scope:s})];case 1:return(e=n.sent()).success?(l.UIMessage.success("Build completed: ".concat(e.builtCount,"/").concat(e.totalCount," packages")),f()):l.UIMessage.error("Build failed"),[3,3];case 2:return t=n.sent(),l.UIMessage.error("Build failed: ".concat(j(t,Error)?t.message:"Unknown error")),[3,3];case 3:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var s=e.apply(t,n);function o(e){v(s,r,a,o,l,"next",e)}function l(e){v(s,r,a,o,l,"throw",e)}o(void 0)})})()};if(h)return(0,r.jsx)(l.UICard,{children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:48},children:[(0,r.jsx)(l.UISpin,{size:"large"}),(0,r.jsx)("div",{style:{marginTop:16},children:(0,r.jsx)(l.UITypographyText,{type:"secondary",children:"Analyzing package contents..."})})]})});if(y)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"Failed to load package preview: ".concat(j(y,Error)?y.message:"Unknown error")})});if(!p||0===p.packages.length)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"No packages found in release plan. Generate a plan first."})});var C=p.totalFiles,E=p.totalSize,P=new Map;p.packages.forEach(function(e){e.files.forEach(function(e){var t=U(e.path)||"other",n=P.get(t)||{count:0,size:0};P.set(t,{count:n.count+1,size:n.size+e.size})})});var A=Array.from(P.entries()).sort(function(e,t){return t[1].size-e[1].size}).slice(0,6),R=[{title:"File",dataIndex:"path",key:"path",render:function(e){return(0,r.jsxs)(l.UISpace,{size:4,children:[(0,r.jsx)(l.UIIcon,{name:"FileOutlined",style:{color:S(e)}}),(0,r.jsx)(l.UITypographyText,{code:!0,style:{fontSize:12},children:e})]})}},{title:"Size",dataIndex:"size",key:"size",width:100,align:"right",render:function(e){return(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:b(e)})}}];return(0,r.jsxs)("div",{children:[(0,r.jsxs)(l.UICard,{style:{marginBottom:16},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsxs)(l.UISpace,{size:"large",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",fontSize:12},children:"Total Files"}),(0,r.jsx)(l.UITitle,{level:3,style:{margin:0},children:C})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",fontSize:12},children:"Total Size"}),(0,r.jsx)(l.UITitle,{level:3,style:{margin:0},children:b(E)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",fontSize:12},children:"Packages"}),(0,r.jsx)(l.UITitle,{level:3,style:{margin:0},children:p.packages.length})]})]}),(0,r.jsx)(l.UISpace,{children:T?(0,r.jsx)(l.UITypographyText,{strong:!0,style:{color:c.colorSuccess},children:"Ready to publish"}):(0,r.jsx)(l.UITypographyText,{strong:!0,style:{color:c.colorWarning},children:"Build required"})})]}),(0,r.jsxs)("div",{style:{marginTop:16},children:[(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"BuildOutlined"}),onClick:function(){w()},loading:x,size:"small",children:x?"Building...":k?"Build":"Rebuild"}),(0,r.jsx)(l.UIButton,{icon:(0,r.jsx)(l.UIIcon,{name:"ReloadOutlined"}),onClick:function(){return f()},disabled:x,size:"small",children:"Refresh"})]}),k&&(0,r.jsx)(l.UIAlert,{variant:"warning",message:"Some packages need to be built before publishing",style:{marginTop:12},showIcon:!0})]}),(0,r.jsxs)("div",{style:{marginTop:24},children:[(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:"File Types"}),(0,r.jsx)(l.UISpace,{wrap:!0,children:A.map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(t=r.next()).done)&&(a.push(t.value),2!==a.length);s=!0);}catch(e){o=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return I(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return I(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.")}(),n=t[0],a=t[1];return(0,r.jsxs)(l.UITag,{style:{margin:0},children:[(0,r.jsxs)("span",{style:{color:S(".".concat(n))},children:[".",n]})," ",a.count," (",b(a.size),")"]},n)})})]})]}),p.packages.map(function(e){return(0,r.jsxs)(l.UICard,{title:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UIIcon,{name:"FolderOutlined"}),(0,r.jsx)(l.UITypographyText,{strong:!0,children:e.name}),(0,r.jsxs)(l.UITag,{color:"blue",children:["v",e.version]})]}),extra:(0,r.jsxs)(l.UISpace,{children:["ready"===e.buildStatus?(0,r.jsx)(l.UITag,{color:"success",children:"Built"}):"building"===e.buildStatus?(0,r.jsx)(l.UITag,{color:"processing",children:"Building..."}):(0,r.jsx)(l.UITag,{color:"warning",children:"Not built"}),(0,r.jsxs)(l.UITag,{children:[e.fileCount," files"]}),(0,r.jsx)(l.UITag,{color:"green",children:b(e.totalSize)})]}),style:{marginBottom:16},size:"small",children:[(0,r.jsx)("div",{style:{marginBottom:16},children:(0,r.jsx)(l.UIProgress,{percent:100,success:{percent:e.files.filter(function(e){return e.path.endsWith(".js")||e.path.endsWith(".mjs")}).reduce(function(e,t){return e+t.size},0)/e.totalSize*100},strokeColor:c.colorPrimary,trailColor:c.colorFillTertiary,showInfo:!1,size:"small"})}),(0,r.jsx)(l.UITable,{dataSource:e.files,columns:R,rowKey:"path",size:"small",pagination:e.files.length>10&&{pageSize:10}})]},e.name)})]})}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,a,s,o){try{var l=e[s](o),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var s=e.apply(t,n);function o(e){w(s,r,a,o,l,"next",e)}function l(e){w(s,r,a,o,l,"throw",e)}o(void 0)})}}function E(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function A(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);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 T(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){var n,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:i(0)}),l(o,"throw",{value:i(1)}),l(o,"return",{value:i(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function z(e){var t,n,s=e.selectedScope,i=e.onReleaseComplete,c=(0,o.useTheme)().antdToken,u=R(a.useState(""),2),d=u[0],p=u[1],h=R(a.useState(""),2),y=h[0],f=h[1],g=R(a.useState([]),2),m=g[0],x=g[1],I=R(a.useState(!1),2),v=I[0],j=I[1],b=R(a.useState(!1),2),U=b[0],S=b[1],k=R(a.useState(!1),2),T=k[0],w=k[1],z=R(a.useState(!1),2),M=z[0],B=z[1],D=R(a.useState(null),2),L=D[0],N=D[1],F=s?"/v1/plugins/release/plan?scope=".concat(encodeURIComponent(s)):"",_=s?"/v1/plugins/release/checks?scope=".concat(encodeURIComponent(s)):"",V=(0,o.useData)(F).data,G=(0,o.useData)(_),$=G.data,W=G.isLoading,H=(0,o.useMutateData)("/v1/plugins/release/checks/run","POST").mutateAsync,K=(0,o.useMutateData)("/v1/plugins/release/run","POST"),q=K.mutateAsync,Y=K.isLoading,J=(0,o.useMutateData)("/v1/plugins/release/plan","DELETE"),Q=J.mutateAsync,X=J.isLoading;a.useEffect(function(){!$||v||U||0!==m.length||x($.checks.map(function(e){return{id:e.id,name:e.name,status:"pending",optional:e.optional}}))},[$,v,U,m.length]);var Z=m.length>0&&m.every(function(e){return"success"===e.status}),ee=m.some(function(e){return"error"===e.status}),et=function(e){switch(e){case"running":return(0,r.jsx)(l.UIIcon,{name:"LoadingOutlined",style:{color:c.colorPrimary}});case"success":return(0,r.jsx)(l.UIIcon,{name:"CheckCircleOutlined",style:{color:c.colorSuccess}});case"error":return(0,r.jsx)(l.UIIcon,{name:"CloseCircleOutlined",style:{color:c.colorError}});default:return(0,r.jsx)(l.UIIcon,{name:"SafetyCertificateOutlined",style:{color:c.colorTextTertiary}})}};return M?(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIResult,{status:"success",title:"Release Published!",subTitle:"".concat(null!=(t=null==V||null==(n=V.plan)?void 0:n.packages.length)?t:0," package(s) published to npm"),extra:[(0,r.jsx)(l.UIPopconfirm,{title:"Rollback Release",description:"This will unpublish the packages. Are you sure?",icon:(0,r.jsx)(l.UIIcon,{name:"ExclamationCircleOutlined",style:{color:"#ff4d4f"}}),onConfirm:function(){C(function(){var e;return O(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,Q({scope:s})];case 1:return t.sent(),l.UIMessage.success("Rollback completed successfully"),B(!1),w(!1),N(null),j(!1),x(function(e){return e.map(function(e){return A(P({},e),{status:"pending",error:void 0,duration:void 0})})}),[3,3];case 2:return e=t.sent(),l.UIMessage.error("Rollback failed: ".concat(E(e,Error)?e.message:"Unknown error")),[3,3];case 3:return[2]}})})()},okText:"Yes, Rollback",okButtonProps:{danger:!0},cancelText:"Cancel",children:(0,r.jsx)(l.UIButton,{icon:(0,r.jsx)(l.UIIcon,{name:"RollbackOutlined"}),loading:X,danger:!0,children:"Rollback"})},"rollback")]})}):(0,r.jsxs)("div",{children:[(0,r.jsx)(l.UICard,{title:(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)("span",{children:"Pre-release Checks"}),Z&&(0,r.jsx)(l.UIBadge,{variant:"success",children:"All Passed"}),ee&&(0,r.jsx)(l.UIBadge,{variant:"error",children:"Failed"})]}),style:{marginBottom:16},children:(0,r.jsxs)(l.UISpace,{direction:"vertical",style:{width:"100%"},size:"middle",children:[W&&0===m.length&&(0,r.jsx)(l.UISkeleton,{active:!0,lines:4,title:!1}),!W&&0===m.length&&(0,r.jsx)(l.UITypographyText,{type:"secondary",children:"No checks configured in kb.config.json release.checks"}),m.map(function(e){var t;return(0,r.jsx)(l.UICard,{size:"small",status:"success"===(t=e.status)?"success":"error"===t?"error":"default",children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsxs)(l.UISpace,{children:[et(e.status),(0,r.jsxs)("div",{children:[(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UITypographyText,{strong:!0,children:e.name}),e.optional&&(0,r.jsx)(l.UITag,{children:"optional"})]}),e.error&&(0,r.jsx)("div",{style:{marginTop:4},children:(0,r.jsx)("pre",{style:{margin:0,padding:"8px 12px",fontSize:11,lineHeight:1.5,color:c.colorError,background:c.colorErrorBg,borderRadius:c.borderRadiusSM,maxHeight:200,overflow:"auto",whiteSpace:"pre-wrap",wordBreak:"break-all"},children:e.error})})]})]}),e.duration&&(0,r.jsxs)(l.UITag,{children:[(e.duration/1e3).toFixed(1),"s"]})]})},e.id)}),(0,r.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,r.jsx)(l.UIButton,{variant:"primary",icon:(0,r.jsx)(l.UIIcon,{name:"BuildOutlined"}),onClick:function(){C(function(){var e,t;return O(this,function(n){switch(n.label){case 0:S(!0),j(!1),x(function(e){return e.map(function(e){return A(P({},e),{status:"running",error:void 0,duration:void 0})})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,H({scope:s})];case 2:return e=n.sent(),x(function(t){var n=new Map(e.checks.map(function(e){return[e.id,e]}));return t.map(function(e){var t=n.get(e.id);return t?A(P({},e),{status:t.success?"success":"error",error:t.error,duration:t.durationMs}):A(P({},e),{status:"pending"})})}),j(e.success),e.success||l.UIMessage.error("Some checks failed"),[3,5];case 3:return t=n.sent(),x(function(e){return e.map(function(e){return A(P({},e),{status:"pending"})})}),l.UIMessage.error("Checks failed: ".concat(E(t,Error)?t.message:"Unknown error")),[3,5];case 4:return S(!1),[7];case 5:return[2]}})})()},loading:U,disabled:v,children:U?"Running Checks...":"Run Checks"}),(v||ee)&&(0,r.jsx)(l.UIButton,{onClick:function(){x(function(e){return e.map(function(e){return A(P({},e),{status:"pending",error:void 0,duration:void 0})})}),j(!1)},children:"Reset"})]})]})}),(0,r.jsxs)(l.UICard,{title:"npm Publish",children:[!Z&&(0,r.jsx)(l.UIAlert,{message:"Complete pre-release checks first",description:"All checks must pass before you can publish to npm.",variant:"info",showIcon:!0,style:{marginBottom:16}}),L&&(0,r.jsx)(l.UIAlert,{message:"Release Failed",description:L,variant:"error",showIcon:!0,closable:!0,onClose:function(){return N(null)},style:{marginBottom:16}}),(0,r.jsxs)(l.UISpace,{direction:"vertical",style:{width:"100%"},size:"middle",children:[(null==V?void 0:V.plan)&&(0,r.jsx)(l.UIAccordion,{size:"small",items:[{key:"summary",label:"Release Summary",extra:(0,r.jsxs)(l.UITag,{color:"blue",children:[V.plan.packages.length," package(s)"]}),children:(0,r.jsx)("div",{children:V.plan.packages.map(function(e){return(0,r.jsxs)("div",{style:{marginBottom:4},children:[(0,r.jsx)(l.UITypographyText,{code:!0,children:e.name}),(0,r.jsxs)(l.UITypographyText,{type:"secondary",children:[" ",e.currentVersion," → "]}),(0,r.jsx)(l.UITypographyText,{strong:!0,style:{color:"#52c41a"},children:e.nextVersion})]},e.name)})})}]}),(0,r.jsx)(l.UIDivider,{style:{margin:"8px 0"}}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(l.UITypographyText,{strong:!0,style:{display:"block",marginBottom:8},children:["npm One-Time Password (OTP)"," ",(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontWeight:"normal"},children:"— optional"})]}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:"Required only if your npm account uses 2FA. Leave empty to publish via NPM_TOKEN."}),(0,r.jsx)(l.UIInput,{prefix:(0,r.jsx)(l.UIIcon,{name:"LockOutlined"}),placeholder:"123456",value:d,onChange:function(e){p(e.replace(/\D/g,"").slice(0,6)),f("")},maxLength:6,style:{width:200,fontSize:18,letterSpacing:8},status:y?"error":void 0,disabled:!Z||T}),y&&(0,r.jsx)(l.UITypographyText,{type:"danger",style:{display:"block",marginTop:4,fontSize:12},children:y})]}),(0,r.jsx)(l.UIDivider,{style:{margin:"8px 0"}}),(0,r.jsx)(l.UIButton,{variant:"primary",size:"large",icon:(0,r.jsx)(l.UIIcon,{name:"RocketOutlined"}),onClick:function(){C(function(){var e,t,n,r,a;return O(this,function(o){switch(o.label){case 0:if(!(d&&!/^\d{6}$/.test(d)?(f("OTP must be 6 digits"),!1):(f(""),!0)))return[2];w(!0),N(null),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,q({scope:s,dryRun:!1,otp:d})];case 2:return(e=o.sent()).success?(B(!0),l.UIMessage.success("Release published successfully!"),i()):(N(n=(null==(t=e.errors)?void 0:t.join(", "))||"Unknown publish error"),w(!1),l.UIMessage.error("Release failed: ".concat(n))),[3,4];case 3:return N(a=E(r=o.sent(),Error)?r.message:"Unknown error"),w(!1),l.UIMessage.error("Release failed: ".concat(a)),[3,4];case 4:return[2]}})})()},loading:Y,disabled:!Z||T,block:!0,children:"Publish to npm"}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{textAlign:"center",display:"block",fontSize:12},children:"This action will publish packages to the npm registry"})]})]})]})}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);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 M(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=[{key:"plan",title:"Plan"},{key:"changelog",title:"Changelog"},{key:"preview",title:"Preview"},{key:"release",title:"Release"}],L=D.map(function(e){return e.key}),N={plan:0,changelog:1,preview:2,release:3};function F(e){var t,n=e.selectedScope,i=e.selectedScopePath,c=B((0,s.useSearchParams)(),2),u=c[0],p=c[1],h=(0,o.useTheme)().antdToken,y=(0,o.useMutateData)("/v1/plugins/release/plan","DELETE").mutateAsync,f=null!=(t=N[u.get("step")])?t:0,g=function(e){p(function(t){var n,r=new URLSearchParams(t);return r.set("step",null!=(n=L[e])?n:"plan"),r})},m=B(a.useState(!1),2),I=m[0],v=m[1],j=B(a.useState(!1),2),b=j[0],U=j[1],S=B(a.useState(!1),2),T=S[0],w=S[1],C=B(a.useState(!1),2),E=C[0],P=C[1];return n?I?(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIResult,{status:"success",title:"Release Complete!",subTitle:"Your packages have been published successfully.",extra:[(0,r.jsx)(l.UIButton,{variant:"primary",onClick:function(){y({scope:n}),g(0),v(!1),U(!1),w(!1),P(!1)},children:"Start New Release"},"new")]})}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16,paddingBottom:8,borderBottom:"1px solid ".concat(h.colorBorderSecondary)},children:[(0,r.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13},children:D.map(function(e,t){var n=t===f,s=t<f;return(0,r.jsxs)(a.Fragment,{children:[t>0&&(0,r.jsx)("span",{style:{color:h.colorTextQuaternary},children:"›"}),(0,r.jsx)("span",{onClick:s?function(){return g(t)}:void 0,style:{color:n?h.colorPrimary:s?h.colorText:h.colorTextTertiary,fontWeight:n?600:400,cursor:s?"pointer":"default"},children:e.title})]},e.key)})}),(0,r.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,r.jsx)(l.UIButton,{variant:"text",onClick:function(){f>0&&g(f-1)},disabled:0===f,size:"small",children:"Back"}),f<D.length-1&&(0,r.jsx)(l.UIButton,{variant:"link",onClick:function(){f<D.length-1&&g(f+1)},disabled:!(0===f?b:1===f?T:2===f&&E),size:"small",children:"Next"})]})]}),function(){switch(f){case 0:return(0,r.jsx)(d,{selectedScope:n,selectedScopePath:i,onPlanReady:U});case 1:return(0,r.jsx)(x,{selectedScope:n,onChangelogReady:w});case 2:return(0,r.jsx)(k,{selectedScope:n,onPreviewReady:P});case 3:return(0,r.jsx)(z,{selectedScope:n,onReleaseComplete:function(){return v(!0)}});default:return null}}()]}):(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIResult,{status:"info",title:"Select a scope",subTitle:"Please select a package or monorepo scope to start the release process."})})}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);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 _(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var G=[{title:"Package",dataIndex:"name",key:"name",ellipsis:!0},{title:"Current",dataIndex:"currentVersion",key:"currentVersion",width:180,ellipsis:!0,render:function(e){return e?(0,r.jsx)(l.UITag,{color:"blue",title:e,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:e}):"-"}},{title:"Next",dataIndex:"nextVersion",key:"nextVersion",width:180,ellipsis:!0,render:function(e){return e?(0,r.jsx)(l.UITag,{color:"green",title:e,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:e}):"-"}},{title:"Bump",dataIndex:"bump",key:"bump",width:90},{title:"Reason",dataIndex:"reason",key:"reason",ellipsis:!0,render:function(e){return(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12},children:e||"-"})}}];function $(e){var t,n,a,s,i=e.releaseId,c=e.releaseScope,u=(0,o.useData)("/v1/plugins/release/history/".concat(encodeURIComponent(c),"/").concat(encodeURIComponent(i),"/report")).data,d=(0,o.useData)("/v1/plugins/release/history/".concat(encodeURIComponent(c),"/").concat(encodeURIComponent(i),"/plan")).data,p=(0,o.useData)("/v1/plugins/release/history/".concat(encodeURIComponent(c),"/").concat(encodeURIComponent(i),"/changelog")).data,h=[{key:"report",label:"Report",children:(null==u?void 0:u.report)?(0,r.jsxs)(l.UIDescriptions,{bordered:!0,column:1,size:"small",children:[(0,r.jsx)(l.UIDescriptionsItem,{label:"Release ID",children:u.id}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Scope",children:u.report.scope}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Stage",children:u.report.stage}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Timestamp",children:new Date(u.report.ts).toLocaleString()}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Status",children:(0,r.jsx)(l.UITag,{color:(null==(t=u.report.result)?void 0:t.ok)?"success":"error",children:(null==(n=u.report.result)?void 0:n.ok)?"Success":"Failed"})}),(null==(a=u.report.result)?void 0:a.timingMs)&&(0,r.jsxs)(l.UIDescriptionsItem,{label:"Duration",children:[u.report.result.timingMs,"ms"]}),(null==(s=u.report.result)?void 0:s.published)&&(0,r.jsx)(l.UIDescriptionsItem,{label:"Packages Published",children:u.report.result.published.length})]}):(0,r.jsx)(l.UISpin,{})},{key:"plan",label:"Plan",children:(null==d?void 0:d.plan)?(0,r.jsxs)("div",{children:[(0,r.jsxs)(l.UIDescriptions,{bordered:!0,column:2,size:"small",style:{marginBottom:16},children:[(0,r.jsx)(l.UIDescriptionsItem,{label:"Scope",children:d.plan.scope}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Strategy",children:d.plan.strategy}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Packages",children:d.plan.packages.length}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Rollback",children:d.plan.rollbackEnabled?"Enabled":"Disabled"})]}),(0,r.jsx)(l.UITable,{columns:G,dataSource:d.plan.packages,rowKey:"name",size:"small",pagination:d.plan.packages.length>10&&{pageSize:10},scroll:{x:"max-content"}})]}):(0,r.jsx)(l.UISpin,{})},{key:"changelog",label:"Changelog",children:void 0===p?(0,r.jsx)(l.UISpin,{}):p.markdown?(0,r.jsx)(l.UIMarkdownViewer,{content:p.markdown}):(0,r.jsx)(l.UIEmptyState,{description:"No changelog for this release",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})}];return(0,r.jsx)(l.UITabs,{items:h})}function W(e){var t,n=e.selectedScope,s=(0,o.useTheme)().antdToken,i=V((0,a.useState)(null),2),c=i[0],u=i[1],d=V((0,a.useState)(""),2),p=d[0],h=d[1],y=V((0,a.useState)(!1),2),f=y[0],g=y[1],m=(0,o.useData)("/v1/plugins/release/history"),x=m.data,I=m.isLoading,v=m.error,j=function(e,t){u(e),h(t),g(!0)};if(I)return(0,r.jsx)(l.UISpin,{size:"large",style:{display:"block",margin:"48px auto"}});if(v)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"Failed to load history: ".concat((null!=(t=Error)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](v):v instanceof t)?v.message:"Unknown error"),image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})});var b=(null==x?void 0:x.releases)?n?x.releases.filter(function(e){return e.scope===n}):x.releases:[];if(0===b.length)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:n?'No release history for scope "'.concat(n,'" yet'):"No release history yet",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})});var U=b.map(function(e){return{dot:e.success?(0,r.jsx)(l.UIIcon,{name:"CheckCircleOutlined",style:{color:s.colorSuccess}}):(0,r.jsx)(l.UIIcon,{name:"CloseCircleOutlined",style:{color:s.colorError}}),children:(0,r.jsx)(l.UICard,{size:"small",style:{marginBottom:16},children:(0,r.jsxs)(l.UISpace,{direction:"vertical",style:{width:"100%"},children:[(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UITag,{color:"blue",children:e.scope}),(0,r.jsx)(l.UITag,{color:e.success?"success":"error",children:e.success?"Success":"Failed"}),(0,r.jsx)(l.UITypographyText,{type:"secondary",children:new Date(e.timestamp).toLocaleString()})]}),(0,r.jsxs)(l.UITypographyText,{children:["Released ",e.packages.length," package(s)"]}),(0,r.jsx)(l.UIButton,{icon:(0,r.jsx)(l.UIIcon,{name:"EyeOutlined"}),onClick:function(){return j(e.id,e.scope)},size:"small",children:"View Details"})]})})}});return(0,r.jsxs)(l.UICard,{title:(0,r.jsx)(l.UITitle,{level:4,style:{margin:0},children:"Release History"}),children:[(0,r.jsx)(l.UITimeline,{items:U}),(0,r.jsx)(l.UIModal,{title:"Release Details - ".concat(c),open:f,onCancel:function(){g(!1),u(null),h("")},footer:null,width:800,children:c&&p&&(0,r.jsx)($,{releaseId:c,releaseScope:p})})]})}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function K(e){if(!e)return"Never";var t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"Just now";if(t<60)return"".concat(t,"m ago");var n=Math.floor(t/60);if(n<24)return"".concat(n,"h ago");var r=Math.floor(n/24);return"".concat(r,"d ago")}function q(e){var t,n,a,s=e.scope,i=e.selectedScope,c=e.onStartRelease,u=e.onViewHistory,d=i?"/v1/plugins/release/status?scope=".concat(encodeURIComponent(i)):"",p=i?"/v1/plugins/release/git-timeline?scope=".concat(encodeURIComponent(i)):"",h=i?"/v1/plugins/release/history?scope=".concat(encodeURIComponent(i)):"",y=(0,o.useData)(d),f=y.data,g=y.isLoading,m=(0,o.useData)(p),x=m.data,I=m.isLoading,v=(0,o.useData)(h),j=v.data,b=v.isLoading;if(!i)return(0,r.jsx)(l.UICard,{children:(0,r.jsx)(l.UIEmptyState,{description:"Select a scope to see its release status",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})});if(g||I||b)return(0,r.jsx)(l.UISpin,{size:"large",style:{display:"block",margin:"48px auto"}});var U=null!=(t=null==j?void 0:j.releases)?t:[],S=U[0],k=!!(null==f?void 0:f.hasPlan)&&"ready"===f.planStatus,T=function(e){var t=new Map,n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){var l,i=s.value,c=null!=(l=i.channel)?l:"unspecified",u=t.get(c);(!u||new Date(i.timestamp)>new Date(u.timestamp))&&t.set(c,i)}}catch(e){r=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return Array.from(t.entries())}(U),w=(null==x?void 0:x.suggestedBump)&&"none"!==x.suggestedBump?x.suggestedBump:void 0;return(0,r.jsxs)("div",{children:[k&&(0,r.jsx)(l.UIAlert,{variant:"info",message:"Release in progress for this scope",description:"A plan has already been generated but not yet published.",action:(0,r.jsx)(l.UIButton,{size:"small",onClick:c,children:"Continue"}),showIcon:!0,style:{marginBottom:16}}),(0,r.jsxs)(l.UIRow,{gutter:16,style:{marginBottom:16},children:[(0,r.jsx)(l.UICol,{span:6,children:(0,r.jsx)(l.UIMetricCard,{label:"Current Version",value:null!=(n=null==s?void 0:s.currentVersion)?n:"—"})}),(0,r.jsx)(l.UICol,{span:6,children:(0,r.jsx)(l.UIMetricCard,{label:"Unreleased Changes",value:null!=(a=null==x?void 0:x.unreleased)?a:0,status:(null==x?void 0:x.hasUnreleasedChanges)?"warning":"success"})}),(0,r.jsx)(l.UICol,{span:6,children:(0,r.jsx)(l.UIMetricCard,{label:"Last Release",value:K(null==S?void 0:S.timestamp),status:S?S.success?"success":"error":"default"})}),(0,r.jsx)(l.UICol,{span:6,children:(0,r.jsx)(l.UIMetricCard,{label:"Suggested Bump",value:null!=w?w:"—",status:"info"})})]}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:"Channels"}),0===T.length?(0,r.jsx)(l.UICard,{size:"small",style:{marginBottom:16},children:(0,r.jsx)(l.UIEmptyState,{description:"No releases yet for this scope",image:l.UIEmptyState.PRESENTED_IMAGE_SIMPLE})}):(0,r.jsx)(l.UIRow,{gutter:16,style:{marginBottom:16},children:T.map(function(e){var t,n=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(t=r.next()).done)&&(a.push(t.value),2!==a.length);s=!0);}catch(e){o=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return H(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return H(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.")}(),a=n[0],s=n[1];return(0,r.jsx)(l.UICol,{span:8,children:(0,r.jsxs)(l.UICard,{size:"small",status:s.success?"success":"error",children:[(0,r.jsx)(l.UITag,{children:a}),(0,r.jsx)("div",{style:{marginTop:8},children:(0,r.jsx)(l.UITypographyText,{strong:!0,children:null!=(t=s.version)?t:"—"})}),(0,r.jsxs)("div",{style:{marginTop:4},children:[(0,r.jsx)(l.UIBadge,{variant:s.success?"success":"error",children:s.success?"Success":"Failed"}),(0,r.jsx)(l.UITypographyText,{type:"secondary",style:{fontSize:12,marginLeft:8},children:K(s.timestamp)})]})]})},a)})}),(0,r.jsxs)(l.UISpace,{children:[(0,r.jsx)(l.UIButton,{variant:"primary",onClick:c,children:"Start New Release"}),(0,r.jsx)(l.UIButton,{onClick:u,children:"View History"})]})]})}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var J="overview";let Q=function(){var e,t,n,i,c,u,d=function(e){if(Array.isArray(e))return e}(e=(0,s.useSearchParams)())||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(t=r.next()).done)&&(a.push(t.value),2!==a.length);s=!0);}catch(e){o=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return Y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Y(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.")}(),p=d[0],h=d[1],y=null!=(t=p.get("scope"))?t:"",f=null!=(n=p.get("tab"))?n:J,g=function(e){h(function(t){var n=new URLSearchParams(t);return n.set("scope",e),n.delete("step"),n})},m=function(e){h(function(t){var n=new URLSearchParams(t);return e===J?n.delete("tab"):n.set("tab",e),n})},x=(0,o.useData)("/v1/plugins/release/scopes"),I=x.data,v=x.isLoading;a.useEffect(function(){if((null==I?void 0:I.scopes)&&I.scopes.length>0&&!y){var e,t,n=I.scopes.find(function(e){return"root"===e.id}),r=I.scopes[0];g(null!=(e=null!=(t=null==n?void 0:n.id)?t:null==r?void 0:r.id)?e:"")}},[I]);var j=null==I||null==(c=I.scopes)?void 0:c.find(function(e){return e.id===y}),b=function(e){switch(e){case"monorepo":return"blue";case"package":return"green";case"root":return"purple";default:return"default"}},U=(0,r.jsx)(l.UITabs,{activeKey:f,onChange:m,items:[{key:"overview",label:"Overview",children:(0,r.jsx)(q,{scope:j,selectedScope:y,onStartRelease:function(){h(function(e){var t=new URLSearchParams(e);return t.set("tab","flow"),t.delete("step"),t})},onViewHistory:function(){return m("history")}})},{key:"flow",label:"Release Flow",children:(0,r.jsxs)(r.Fragment,{children:[j&&(0,r.jsx)(l.UIAccordion,{size:"small",style:{marginBottom:16},items:[{key:"scope-info",label:j.currentVersion?"".concat(j.name," v").concat(j.currentVersion):j.name,extra:(0,r.jsx)(l.UITag,{color:b(j.type),children:j.type}),children:(0,r.jsxs)(l.UIDescriptions,{size:"small",column:1,bordered:!0,children:[(0,r.jsx)(l.UIDescriptionsItem,{label:"Package Name",children:j.id}),j.currentVersion&&(0,r.jsx)(l.UIDescriptionsItem,{label:"Current Version",children:j.currentVersion}),j.description&&(0,r.jsx)(l.UIDescriptionsItem,{label:"Description",children:j.description}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Path",children:(0,r.jsx)("code",{style:{fontSize:12},children:j.path})}),(0,r.jsx)(l.UIDescriptionsItem,{label:"Type",children:(0,r.jsx)(l.UITag,{color:b(j.type),children:j.type})})]})}]}),(0,r.jsx)(F,{selectedScope:y,selectedScopePath:null==j?void 0:j.path})]})},{key:"history",label:"History",children:(0,r.jsx)(W,{selectedScope:y})}]});return(0,r.jsx)(l.UIPage,{children:(0,r.jsx)(l.UIPageHeader,{title:"Release Manager",description:"Plan, execute, and audit releases across your workspace",actions:(0,r.jsx)(l.UISelect,{style:{width:400},placeholder:"Select scope (package or monorepo)",value:y||void 0,onChange:function(e){return g(e)},loading:v,showSearch:!0,optionFilterProp:"label",options:null!=(i=null==I||null==(u=I.scopes)?void 0:u.map(function(e){return{label:"".concat(e.name," (").concat(e.type,")"),value:e.id}}))?i:[]}),tabs:U})})}}}]);
@@ -1,229 +0,0 @@
1
- {
2
- "id": "releasePlugin",
3
- "name": "releasePlugin",
4
- "metaData": {
5
- "name": "releasePlugin",
6
- "globalName": "releasePlugin",
7
- "buildInfo": {
8
- "buildVersion": "2.119.0-canary.e120bc0ee",
9
- "buildName": "@kb-labs/release-manager-cli"
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": "releasePlugin:@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": "releasePlugin:@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": "releasePlugin: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": "releasePlugin:@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": "releasePlugin:@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": "releasePlugin: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": "releasePlugin: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": "releasePlugin:@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": "releasePlugin: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": "releasePlugin:ReleasePage",
211
- "name": "ReleasePage",
212
- "assets": {
213
- "js": {
214
- "sync": [
215
- "__federation_expose_ReleasePage.js"
216
- ],
217
- "async": [
218
- "775.js"
219
- ]
220
- },
221
- "css": {
222
- "sync": [],
223
- "async": []
224
- }
225
- },
226
- "path": "./ReleasePage"
227
- }
228
- ]
229
- }
@@ -1,256 +0,0 @@
1
- {
2
- "id": "releasePlugin",
3
- "name": "releasePlugin",
4
- "metaData": {
5
- "name": "releasePlugin",
6
- "globalName": "releasePlugin",
7
- "buildInfo": {
8
- "buildVersion": "2.119.0-canary.e120bc0ee",
9
- "buildName": "@kb-labs/release-manager-cli"
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": "releasePlugin:@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": "releasePlugin:@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": "releasePlugin: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": "releasePlugin:@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": "releasePlugin:@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": "releasePlugin: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/ReleasePage.tsx"
158
- ],
159
- "usedExports": []
160
- },
161
- {
162
- "id": "releasePlugin: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": "releasePlugin:@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": "releasePlugin: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
- "src/studio/pages/ReleasePage.tsx"
225
- ],
226
- "usedExports": []
227
- }
228
- ],
229
- "remotes": [],
230
- "exposes": [
231
- {
232
- "path": "./ReleasePage",
233
- "file": "src/studio/pages/ReleasePage.tsx",
234
- "id": "releasePlugin:ReleasePage",
235
- "name": "ReleasePage",
236
- "requires": [
237
- "react-router-dom",
238
- "react"
239
- ],
240
- "assets": {
241
- "js": {
242
- "sync": [
243
- "__federation_expose_ReleasePage.js"
244
- ],
245
- "async": [
246
- "775.js"
247
- ]
248
- },
249
- "css": {
250
- "sync": [],
251
- "async": []
252
- }
253
- }
254
- }
255
- ]
256
- }