@commandkit/devtools 1.2.0-rc.3 → 1.2.0-rc.4

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.
@@ -0,0 +1 @@
1
+ import{g as X,u as tt,a as et,j as y,L as rt,B as nt}from"./index-aesTD9GY.js";var I={exports:{}},st=I.exports,V;function it(){return V||(V=1,(function(k,H){(function(N,D){k.exports=D()})(st,(function(){var N=1e3,D=6e4,g=36e5,U="millisecond",_="second",O="minute",b="hour",v="day",C="week",m="month",J="quarter",M="year",j="date",Z="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,K={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var r=["th","st","nd","rd"],t=s%100;return"["+s+(r[(t-20)%10]||r[t]||r[0])+"]"}},q=function(s,r,t){var n=String(s);return!n||n.length>=r?s:""+Array(r+1-n.length).join(t)+s},G={s:q,z:function(s){var r=-s.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),e=t%60;return(r<=0?"+":"-")+q(n,2,"0")+":"+q(e,2,"0")},m:function s(r,t){if(r.date()<t.date())return-s(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),e=r.clone().add(n,m),i=t-e<0,a=r.clone().add(n+(i?-1:1),m);return+(-(n+(t-e)/(i?e-a:a-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:M,w:C,d:v,D:j,h:b,m:O,s:_,ms:U,Q:J}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},T="en",x={};x[T]=K;var z="$isDayjsObject",R=function(s){return s instanceof F||!(!s||!s[z])},W=function s(r,t,n){var e;if(!r)return T;if(typeof r=="string"){var i=r.toLowerCase();x[i]&&(e=i),t&&(x[i]=t,e=i);var a=r.split("-");if(!e&&a.length>1)return s(a[0])}else{var o=r.name;x[o]=r,e=o}return!n&&e&&(T=e),e||!n&&T},f=function(s,r){if(R(s))return s.clone();var t=typeof r=="object"?r:{};return t.date=s,t.args=arguments,new F(t)},u=G;u.l=W,u.i=R,u.w=function(s,r){return f(s,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var F=(function(){function s(t){this.$L=W(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[z]=!0}var r=s.prototype;return r.parse=function(t){this.$d=(function(n){var e=n.date,i=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(P);if(a){var o=a[2]-1||0,c=(a[7]||"0").substring(0,3);return i?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)}}return new Date(e)})(t),this.init()},r.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},r.$utils=function(){return u},r.isValid=function(){return this.$d.toString()!==Z},r.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},r.isAfter=function(t,n){return f(t)<this.startOf(n)},r.isBefore=function(t,n){return this.endOf(n)<f(t)},r.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,n){var e=this,i=!!u.u(n)||n,a=u.p(t),o=function(w,l){var p=u.w(e.$u?Date.UTC(e.$y,l,w):new Date(e.$y,l,w),e);return i?p:p.endOf(v)},c=function(w,l){return u.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(l)),e)},d=this.$W,h=this.$M,$=this.$D,Y="set"+(this.$u?"UTC":"");switch(a){case M:return i?o(1,0):o(31,11);case m:return i?o(1,h):o(0,h+1);case C:var S=this.$locale().weekStart||0,L=(d<S?d+7:d)-S;return o(i?$-L:$+(6-L),h);case v:case j:return c(Y+"Hours",0);case b:return c(Y+"Minutes",1);case O:return c(Y+"Seconds",2);case _:return c(Y+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,n){var e,i=u.p(t),a="set"+(this.$u?"UTC":""),o=(e={},e[v]=a+"Date",e[j]=a+"Date",e[m]=a+"Month",e[M]=a+"FullYear",e[b]=a+"Hours",e[O]=a+"Minutes",e[_]=a+"Seconds",e[U]=a+"Milliseconds",e)[i],c=i===v?this.$D+(n-this.$W):n;if(i===m||i===M){var d=this.clone().set(j,1);d.$d[o](c),d.init(),this.$d=d.set(j,Math.min(this.$D,d.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},r.set=function(t,n){return this.clone().$set(t,n)},r.get=function(t){return this[u.p(t)]()},r.add=function(t,n){var e,i=this;t=Number(t);var a=u.p(n),o=function(h){var $=f(i);return u.w($.date($.date()+Math.round(h*t)),i)};if(a===m)return this.set(m,this.$M+t);if(a===M)return this.set(M,this.$y+t);if(a===v)return o(1);if(a===C)return o(7);var c=(e={},e[O]=D,e[b]=g,e[_]=N,e)[a]||1,d=this.$d.getTime()+t*c;return u.w(d,this)},r.subtract=function(t,n){return this.add(-1*t,n)},r.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||Z;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),o=this.$H,c=this.$m,d=this.$M,h=e.weekdays,$=e.months,Y=e.meridiem,S=function(l,p,A,E){return l&&(l[p]||l(n,i))||A[p].slice(0,E)},L=function(l){return u.s(o%12||12,l,"0")},w=Y||function(l,p,A){var E=l<12?"AM":"PM";return A?E.toLowerCase():E};return i.replace(Q,(function(l,p){return p||(function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return d+1;case"MM":return u.s(d+1,2,"0");case"MMM":return S(e.monthsShort,d,$,3);case"MMMM":return S($,d);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return S(e.weekdaysMin,n.$W,h,2);case"ddd":return S(e.weekdaysShort,n.$W,h,3);case"dddd":return h[n.$W];case"H":return String(o);case"HH":return u.s(o,2,"0");case"h":return L(1);case"hh":return L(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return u.s(c,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null})(l)||a.replace(":","")}))},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,n,e){var i,a=this,o=u.p(n),c=f(t),d=(c.utcOffset()-this.utcOffset())*D,h=this-c,$=function(){return u.m(a,c)};switch(o){case M:i=$()/12;break;case m:i=$();break;case J:i=$()/3;break;case C:i=(h-d)/6048e5;break;case v:i=(h-d)/864e5;break;case b:i=h/g;break;case O:i=h/D;break;case _:i=h/N;break;default:i=h}return e?i:u.a(i)},r.daysInMonth=function(){return this.endOf(m).$D},r.$locale=function(){return x[this.$L]},r.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=W(t,n,!0);return i&&(e.$L=i),e},r.clone=function(){return u.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},s})(),B=F.prototype;return f.prototype=B,[["$ms",U],["$s",_],["$m",O],["$H",b],["$W",v],["$M",m],["$y",M],["$D",j]].forEach((function(s){B[s[1]]=function(r){return this.$g(r,s[0],s[1])}})),f.extend=function(s,r){return s.$i||(s(r,F,f),s.$i=!0),f},f.locale=W,f.isDayjs=R,f.unix=function(s){return f(1e3*s)},f.en=x[T],f.Ls=x,f.p={},f}))})(I)),I.exports}var at=it();const ut=X(at),ot="YYYY-MM-DD HH:mm:ss";function ct(k,H=ot){return ut(k).format(H)}function dt(){const k=tt(),{data:H,isLoading:N,isError:D}=et({queryKey:["plugins"],queryFn:async()=>await k.plugins.fetch()});return N||!H?y.jsx(rt,{}):D?y.jsx("div",{className:"h-screen grid place-items-center",children:y.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching plugins data."})}):y.jsxs("div",{className:"p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Plugins"}),y.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:H.map(g=>y.jsxs("div",{className:"border p-4 rounded",children:[y.jsx("h2",{className:"text-lg font-semibold",children:g.name}),y.jsx(nt,{variant:"outline",className:"text-sm text-gray-500 mt-2 font-mono",children:g.id}),y.jsxs("p",{className:"text-muted-foreground text-xs mt-2 font-medium",children:["Registered at ",ct(g.loadedAt)]})]},g.id))})]})}export{dt as component};
package/ui/index.html CHANGED
@@ -11,7 +11,7 @@
11
11
  <style>
12
12
  @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
13
13
  </style>
14
- <script type="module" crossorigin src="/assets/index-BvL7r8Ib.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-aesTD9GY.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-B_iMxRPI.css">
16
16
  </head>
17
17
  <body>
@@ -1 +0,0 @@
1
- import{g as X,u as tt,a as et,j as y,L as rt,B as nt}from"./index-BvL7r8Ib.js";var I={exports:{}},st=I.exports,V;function it(){return V||(V=1,function(k,H){(function(N,D){k.exports=D()})(st,function(){var N=1e3,D=6e4,g=36e5,U="millisecond",_="second",O="minute",b="hour",v="day",C="week",m="month",J="quarter",M="year",j="date",Z="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,K={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var r=["th","st","nd","rd"],t=s%100;return"["+s+(r[(t-20)%10]||r[t]||r[0])+"]"}},q=function(s,r,t){var n=String(s);return!n||n.length>=r?s:""+Array(r+1-n.length).join(t)+s},G={s:q,z:function(s){var r=-s.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),e=t%60;return(r<=0?"+":"-")+q(n,2,"0")+":"+q(e,2,"0")},m:function s(r,t){if(r.date()<t.date())return-s(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),e=r.clone().add(n,m),i=t-e<0,a=r.clone().add(n+(i?-1:1),m);return+(-(n+(t-e)/(i?e-a:a-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:M,w:C,d:v,D:j,h:b,m:O,s:_,ms:U,Q:J}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},T="en",x={};x[T]=K;var z="$isDayjsObject",R=function(s){return s instanceof F||!(!s||!s[z])},W=function s(r,t,n){var e;if(!r)return T;if(typeof r=="string"){var i=r.toLowerCase();x[i]&&(e=i),t&&(x[i]=t,e=i);var a=r.split("-");if(!e&&a.length>1)return s(a[0])}else{var o=r.name;x[o]=r,e=o}return!n&&e&&(T=e),e||!n&&T},f=function(s,r){if(R(s))return s.clone();var t=typeof r=="object"?r:{};return t.date=s,t.args=arguments,new F(t)},u=G;u.l=W,u.i=R,u.w=function(s,r){return f(s,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var F=function(){function s(t){this.$L=W(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[z]=!0}var r=s.prototype;return r.parse=function(t){this.$d=function(n){var e=n.date,i=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(P);if(a){var o=a[2]-1||0,c=(a[7]||"0").substring(0,3);return i?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)}}return new Date(e)}(t),this.init()},r.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},r.$utils=function(){return u},r.isValid=function(){return this.$d.toString()!==Z},r.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},r.isAfter=function(t,n){return f(t)<this.startOf(n)},r.isBefore=function(t,n){return this.endOf(n)<f(t)},r.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,n){var e=this,i=!!u.u(n)||n,a=u.p(t),o=function(w,l){var p=u.w(e.$u?Date.UTC(e.$y,l,w):new Date(e.$y,l,w),e);return i?p:p.endOf(v)},c=function(w,l){return u.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(l)),e)},d=this.$W,h=this.$M,$=this.$D,Y="set"+(this.$u?"UTC":"");switch(a){case M:return i?o(1,0):o(31,11);case m:return i?o(1,h):o(0,h+1);case C:var S=this.$locale().weekStart||0,L=(d<S?d+7:d)-S;return o(i?$-L:$+(6-L),h);case v:case j:return c(Y+"Hours",0);case b:return c(Y+"Minutes",1);case O:return c(Y+"Seconds",2);case _:return c(Y+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,n){var e,i=u.p(t),a="set"+(this.$u?"UTC":""),o=(e={},e[v]=a+"Date",e[j]=a+"Date",e[m]=a+"Month",e[M]=a+"FullYear",e[b]=a+"Hours",e[O]=a+"Minutes",e[_]=a+"Seconds",e[U]=a+"Milliseconds",e)[i],c=i===v?this.$D+(n-this.$W):n;if(i===m||i===M){var d=this.clone().set(j,1);d.$d[o](c),d.init(),this.$d=d.set(j,Math.min(this.$D,d.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},r.set=function(t,n){return this.clone().$set(t,n)},r.get=function(t){return this[u.p(t)]()},r.add=function(t,n){var e,i=this;t=Number(t);var a=u.p(n),o=function(h){var $=f(i);return u.w($.date($.date()+Math.round(h*t)),i)};if(a===m)return this.set(m,this.$M+t);if(a===M)return this.set(M,this.$y+t);if(a===v)return o(1);if(a===C)return o(7);var c=(e={},e[O]=D,e[b]=g,e[_]=N,e)[a]||1,d=this.$d.getTime()+t*c;return u.w(d,this)},r.subtract=function(t,n){return this.add(-1*t,n)},r.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||Z;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),o=this.$H,c=this.$m,d=this.$M,h=e.weekdays,$=e.months,Y=e.meridiem,S=function(l,p,A,E){return l&&(l[p]||l(n,i))||A[p].slice(0,E)},L=function(l){return u.s(o%12||12,l,"0")},w=Y||function(l,p,A){var E=l<12?"AM":"PM";return A?E.toLowerCase():E};return i.replace(Q,function(l,p){return p||function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return d+1;case"MM":return u.s(d+1,2,"0");case"MMM":return S(e.monthsShort,d,$,3);case"MMMM":return S($,d);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return S(e.weekdaysMin,n.$W,h,2);case"ddd":return S(e.weekdaysShort,n.$W,h,3);case"dddd":return h[n.$W];case"H":return String(o);case"HH":return u.s(o,2,"0");case"h":return L(1);case"hh":return L(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return u.s(c,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(l)||a.replace(":","")})},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,n,e){var i,a=this,o=u.p(n),c=f(t),d=(c.utcOffset()-this.utcOffset())*D,h=this-c,$=function(){return u.m(a,c)};switch(o){case M:i=$()/12;break;case m:i=$();break;case J:i=$()/3;break;case C:i=(h-d)/6048e5;break;case v:i=(h-d)/864e5;break;case b:i=h/g;break;case O:i=h/D;break;case _:i=h/N;break;default:i=h}return e?i:u.a(i)},r.daysInMonth=function(){return this.endOf(m).$D},r.$locale=function(){return x[this.$L]},r.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=W(t,n,!0);return i&&(e.$L=i),e},r.clone=function(){return u.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},s}(),B=F.prototype;return f.prototype=B,[["$ms",U],["$s",_],["$m",O],["$H",b],["$W",v],["$M",m],["$y",M],["$D",j]].forEach(function(s){B[s[1]]=function(r){return this.$g(r,s[0],s[1])}}),f.extend=function(s,r){return s.$i||(s(r,F,f),s.$i=!0),f},f.locale=W,f.isDayjs=R,f.unix=function(s){return f(1e3*s)},f.en=x[T],f.Ls=x,f.p={},f})}(I)),I.exports}var at=it();const ut=X(at),ot="YYYY-MM-DD HH:mm:ss";function ct(k,H=ot){return ut(k).format(H)}function dt(){const k=tt(),{data:H,isLoading:N,isError:D}=et({queryKey:["plugins"],queryFn:async()=>await k.plugins.fetch()});return N||!H?y.jsx(rt,{}):D?y.jsx("div",{className:"h-screen grid place-items-center",children:y.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching plugins data."})}):y.jsxs("div",{className:"p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Plugins"}),y.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:H.map(g=>y.jsxs("div",{className:"border p-4 rounded",children:[y.jsx("h2",{className:"text-lg font-semibold",children:g.name}),y.jsx(nt,{variant:"outline",className:"text-sm text-gray-500 mt-2 font-mono",children:g.id}),y.jsxs("p",{className:"text-muted-foreground text-xs mt-2 font-medium",children:["Registered at ",ct(g.loadedAt)]})]},g.id))})]})}export{dt as component};