dorkos 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +5 -5
- package/dist/client/assets/TopologyGraph-CMVTlVae.js +40 -0
- package/dist/client/assets/highlighted-body-OFNGDK62-Czg_Z-z7.js +1 -0
- package/dist/client/assets/index-0_WhDbXG.js +69 -0
- package/dist/client/assets/index-B0iJkOod.js +1077 -0
- package/dist/client/assets/index-HK1qmj_D.js +1 -0
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as b,j as e,T as f,C as v,P as N,a as E,c as g,B as k,S,u as w,b as y,d as C,e as T,f as R,g as z,t as m}from"./index-B0iJkOod.js";import{E as M,h as _,i as B,k as H}from"./index-B0iJkOod.js";const P=new Set(["disabled","discovered","incompatible","invalid"]);function I({extension:o,onToggle:u,isToggling:c}){const{manifest:s,status:t,scope:h,error:n}=o,[r,a]=b.useState(!1),x=!P.has(t),d=t==="incompatible",l=t==="invalid",i=t==="compile_error"||t==="activate_error",j=!d&&!l;return e.jsx("div",{"data-slot":"extension-card","data-testid":`extension-card-${o.id}`,className:g("bg-card rounded-xl border p-4",i&&"border-amber-500/50",(d||l)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i&&e.jsx(f,{className:"size-4 shrink-0 text-amber-500","aria-hidden":"true"}),(d||l)&&!i&&e.jsx(v,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!i&&!d&&!l&&e.jsx(N,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:s.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",s.version]})]}),s.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:s.description}),d&&s.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Requires DorkOS >= ",s.minHostVersion]}),i&&n&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:[t==="compile_error"?"Compilation error: ":"Activation failed: ",n.message]}),n.details&&e.jsxs("button",{type:"button",onClick:()=>a(p=>!p),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":r,children:[e.jsx(E,{className:g("size-3 transition-transform",r&&"rotate-180")}),r?"Hide details":"Show details"]}),r&&n.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:n.details})]}),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(k,{variant:"outline",className:"text-xs",children:h}),s.author&&e.jsx("span",{children:s.author})]})]}),e.jsx("div",{className:"pt-0.5",children:e.jsx(S,{checked:x,onCheckedChange:p=>u(o.id,p),disabled:!j||c,"aria-label":`${x?"Disable":"Enable"} ${s.name}`})})]})})}function A(){const{data:o=[],isLoading:u}=w(),c=y(),s=C(),t=T(),h=new Set([...c.variables?[c.variables]:[],...s.variables?[s.variables]:[]]);async function n(a,x){(x?c:s).mutate(a,{onSuccess:()=>{m.info("Extension changed — reload the page to apply",{action:{label:"Reload now",onClick:()=>location.reload()}})},onError:l=>{const i=x?"enable":"disable";m.error(`Failed to ${i} extension: ${l.message}`)}})}function r(){t.mutate(void 0,{onSuccess:a=>{m.success(`Reloaded ${a.length} extension(s)`)},onError:()=>{m.error("Failed to reload extensions")}})}return u?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Extensions add new UI and capabilities to DorkOS. Place them in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"})," in your project."]}),o.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsx("div",{className:"space-y-3",children:o.map(a=>e.jsx(I,{extension:a,onToggle:n,isToggling:h.has(a.id)},a.id))}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(R,{variant:"outline",size:"sm",onClick:r,disabled:t.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(z,{className:g("mr-2 size-4",t.isPending&&"animate-spin")}),"Reload Extensions"]})})]})}export{M as ExtensionLoader,_ as ExtensionProvider,A as ExtensionsSettingsTab,B as createExtensionAPI,H as useExtensions};
|
package/dist/server/index.js
CHANGED
|
@@ -84126,7 +84126,7 @@ var SERVER_VERSION = resolveVersion();
|
|
|
84126
84126
|
var IS_DEV_BUILD = checkDevBuild(SERVER_VERSION);
|
|
84127
84127
|
function resolveVersion() {
|
|
84128
84128
|
if (env.DORKOS_VERSION_OVERRIDE) return env.DORKOS_VERSION_OVERRIDE;
|
|
84129
|
-
if (true) return "0.34.
|
|
84129
|
+
if (true) return "0.34.1";
|
|
84130
84130
|
const pkgPath = path5.join(path5.dirname(fileURLToPath2(import.meta.url)), "../../package.json");
|
|
84131
84131
|
return JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
84132
84132
|
}
|