epiq 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/readme.md +21 -6
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ ${d}
|
|
|
60
60
|
See complete log:
|
|
61
61
|
|
|
62
62
|
`)+e.map(r=>JSON.stringify(r)).join(`
|
|
63
|
-
`)):(Wl(),c("State booted successfully",null))}import{Box as sc}from"ink";import _r from"react";import Lt from"chalk";import{Box as Ur,Text as Ms}from"ink";import Dt,{useEffect as jl,useMemo as Kl,useState as Vl}from"react";var Ps=Lt.gray,zl=Lt.inverse,Gl=Lt.inverse.gray,ql={hint:"",hints:[],overlap:0,remainder:""},Ds=({value:e,command:t})=>{if(!t)return null;let n=e.trimStart(),o=e.length-n.length;return e.slice(o,o+t.length)!==t?null:{start:o,end:o+t.length}},Yl=({command:e,modifier:t})=>{if(!t)return null;if(e==="tag"||e==="assign"){let n=X(t);return{bg:r=>Lt.bgHex(n).black(r),bgCursor:r=>Lt.bgHex(n).inverse.black(r)}}return tr(t)},Xl=({value:e,command:t,modifier:n})=>{if(!t||!n)return null;let r=Ds({value:e,command:t});if(!r)return null;let i=e.slice(r.end).match(/^\s*/)?.[0].length??0,a=r.end+i;return e.slice(a,a+n.length)!==n?null:{start:a,end:a+n.length}},ks=()=>({value:J.value,cursorPosition:J.cursorPosition,commandIsPending:J.commandIsPending,autoCompletion:J.commandMeta.autoCompletion??ql,infoMessage:J.commandMeta.infoMessage,validationStatus:J.commandMeta.validity,command:J.commandMeta.command,inputString:J.commandMeta.inputString,modifier:J.commandMeta.modifier}),Jl=(e,t)=>e.value===t.value&&e.cursorPosition===t.cursorPosition&&e.commandIsPending===t.commandIsPending&&e.infoMessage===t.infoMessage&&e.autoCompletion.hint===t.autoCompletion.hint&&e.autoCompletion.overlap===t.autoCompletion.overlap&&e.autoCompletion.remainder===t.autoCompletion.remainder&&e.validationStatus===t.validationStatus&&e.command===t.command&&e.modifier===t.modifier&&e.inputString===t.inputString,Ls=({width:e})=>{let[t,n]=Vl(ks());jl(()=>{let y=()=>{let S=ks();n(A=>Jl(A,S)?A:S)},N=Bo(y);return y(),()=>{N()}},[]);let{value:r,cursorPosition:o,infoMessage:i,commandIsPending:a,autoCompletion:d,command:u,modifier:m}=t,p=Kl(()=>{let y=Math.max(0,Math.min(o,r.length)),N=Ds({value:r,command:u}),S=Xl({value:r,command:u,modifier:m}),A=u?tr(u):null,I=Yl({command:u,modifier:m}),C=(ie,se)=>{let Fn=N&&se>=N.start&&se<N.end,On=S&&se>=S.start&&se<S.end;return Fn&&A?A.fg(ie):On&&I?I.bg(ie):ie},w=(ie,se)=>{let Fn=N&&se>=N.start&&se<N.end,On=S&&se>=S.start&&se<S.end;return Fn&&A?A.fgCursor(ie):On&&I?I.bgCursor(ie):zl(ie)},B=r.slice(0,y),Oe=r[y]??" ",Be=y<r.length?r.slice(y+1):"",Zs=Array.from(B).map((ie,se)=>C(ie,se)).join(""),Gr=w(Oe,y),qr=Array.from(Be).map((ie,se)=>C(ie,y+1+se)).join("");if(d.hint){let ie=d.hint[d.overlap]??Oe;Gr=Gl(ie),qr=Ps(d.remainder.slice(1)+Be)}return Ps(":")+Zs+Gr+qr},[r,o,d,u,m]);return Dt.createElement(Ur,{flexDirection:"column",justifyContent:"flex-start"},Dt.createElement(Ur,{flexDirection:"column",paddingX:1,borderColor:E.secondary,borderStyle:"round",width:e},Dt.createElement(Ur,null,Dt.createElement(Ms,null,p),i&&Dt.createElement(Ms,{wrap:"truncate",color:a?E.red:E.secondary2},` ${i} `))))};import Fs from"chalk";import{Box as Ql,Text as $r}from"ink";import In,{useEffect as Zl,useState as ec}from"react";var tc=["#4c567a","#9d7cd8","#7aa2f7","#7dcfff","#9d7cd8"],Os=e=>{let t=e.replace("#","");return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},nc=({r:e,g:t,b:n})=>{let r=o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0");return`#${r(e)}${r(t)}${r(n)}`},rc=(e,t,n)=>{let r=Os(e),o=Os(t);return nc({r:r.r+(o.r-r.r)*n,g:r.g+(o.g-r.g)*n,b:r.b+(o.b-r.b)*n})},oc=(e,t)=>{if(e.length===1)return e[0];let n=t*(e.length-1),r=Math.floor(n),o=n-r,i=e[r],a=e[Math.min(r+1,e.length-1)];return rc(i,a,o)},ic=(e,t)=>e.length===t?e:e.length>t?e.slice(0,t):e.padEnd(t," "),Bs=({width:e,availableHints:t})=>{let{syncStatus:{status:n,msg:r}}=$(),[o,i]=ec(0);Zl(()=>{if(n!=="syncing"){i(0);return}let C=setInterval(()=>{i(w=>w+1)},50);return()=>clearInterval(C)},[n]);let a=[],d=0;for(let C of t){let B=(a.length>0?" | ":"").length+C.length;if(d+B>e-4)break;a.push(C),d+=B}let u=n!="synced"?r??a.join(" | "):a.join(" | "),m=Math.max(0,e-2),p=n==="syncing"?oc(tc,(Math.sin(o*.12)+1)/2):E.secondary,y=Fs.hex(p??"fff"),N=Fs.hex(E.secondary2),S=y(`\u256D${"\u2500".repeat(m)}\u256E`),A=y(`\u2570${"\u2500".repeat(m)}\u256F`),I=`${y("\u2502")}${N(ic(` ${u} `,m))}${y("\u2502")}`;return In.createElement(Ql,{flexDirection:"column",width:e},In.createElement($r,null,S),In.createElement($r,null,I),In.createElement($r,null,A))};var Sn=({width:e,mode:t,availableHints:n})=>{let r=$(),o=[],i=0;for(let a of n){let u=(o.length>0?" | ":"").length+a.length;if(i+u>e+2)break;o.push(a),i+=u}return _r.createElement(sc,null,t===g.COMMAND_LINE&&r.syncStatus.status!=="syncing"?_r.createElement(Ls,{width:e}):_r.createElement(Bs,{width:e,mode:t,availableHints:n}))};import{Box as mt,Text as Us}from"ink";import He from"react";var $s=({width:e})=>{let t=[...v().availableActions].map(n=>n.description).filter(n=>n!==void 0).map(n=>{let[r,o]=n.split("]"),i=r?.replace("[",""),a=o?.trim();return[i,a]}).filter(n=>n[0]!==void 0&&n[1]!==void 0).sort(([n],[r])=>n.length===1&&r.length!==1?-1:n.length!==1&&r.length===1?1:n.localeCompare(r,void 0,{sensitivity:"base"}));return t.unshift(["Key(s)","Action"]),He.createElement(mt,{flexDirection:"column",marginTop:3,borderColor:E.secondary,borderStyle:"round",width:e,minHeight:19},He.createElement(mt,{flexDirection:"column",width:e},v().mode===g.HELP?t.map(([n,r],o)=>He.createElement(mt,{paddingLeft:1,key:o,flexDirection:"row"},He.createElement(mt,{key:o,flexDirection:"row",paddingBottom:o?0:1},He.createElement(mt,{width:20,justifyContent:"flex-end"},He.createElement(Us,{color:o?E.accent:E.secondary},n)),He.createElement(mt,{flexGrow:1,width:40,paddingLeft:2},He.createElement(Us,{color:o?E.primary:E.secondary},r))))):null))};import ac from"chalk";import{Box as An,Text as je}from"ink";import ge from"react";var _s=({width:e,height:t})=>ge.createElement(An,{height:t-4,flexDirection:"column",width:e,paddingTop:1,paddingLeft:2,borderStyle:"round",borderColor:E.secondary,rowGap:1},ge.createElement(je,{color:E.accent,bold:!0},"Initialize project"),ge.createElement(je,null,`This folder is not an ${ac.hex(E.accent)("epiq")} project yet.`),ge.createElement(je,{color:E.primary},"To start tracking issues here, we need to initialize a new"," ",ge.createElement(je,{color:E.primary,backgroundColor:E.secondary}," .epiq/project.json ")," ","file in this repository."),ge.createElement(An,{marginTop:1,flexDirection:"column"},ge.createElement(An,null,ge.createElement(je,{color:E.accent}," "),ge.createElement(je,{color:E.primary},"Type "),ge.createElement(je,{backgroundColor:E.secondary}," :init "))),ge.createElement(An,{marginTop:1},ge.createElement(je,{color:E.secondary2},"(This will create the local epiq project files)")));import{Box as Ft,Text as xe}from"ink";import H from"react";var Tn=({isDone:e,command:t,value:n})=>H.createElement(Ft,null,H.createElement(xe,{color:E.accent,dimColor:e},e?" \u2714 ":" "),H.createElement(xe,{dimColor:e},"Type "),H.createElement(xe,{backgroundColor:E.secondary,dimColor:e}," "+t+" "),n&&H.createElement(H.Fragment,null,H.createElement(xe,{dimColor:e}," "),H.createElement(xe,{color:E.secondary,dimColor:e},"<"+n+">")));function Wr({width:e,height:t,hasUserName:n,hasPreferredEditor:r,userName:o,preferredEditor:i}){let a=n&&r,d=n?r?null:":config:editor":":config:username";return H.createElement(Ft,{height:t-4,flexDirection:"column",width:e,paddingTop:1,paddingLeft:2,borderStyle:"round",borderColor:E.secondary,rowGap:1},H.createElement(xe,{color:E.accent,bold:!0},"Welcome! \u{1F539}"),H.createElement(xe,null,"Lets get you started - its a breeze."),H.createElement(xe,{color:E.secondary2},"And remember, you can always get help with"," ",H.createElement(xe,{color:E.accent},":help"),"."),!a&&H.createElement(xe,{color:E.secondary2},d===":config:username"?"First, choose your username.":"Nice. One more step."),H.createElement(Ft,{flexDirection:"column"},n&&H.createElement(Ft,{marginBottom:1},H.createElement(Tn,{isDone:!0,command:":config:username",value:o})),!n&&H.createElement(Tn,{isDone:!1,command:":config:username"}),n&&!r&&H.createElement(Tn,{isDone:!1,command:":config:editor"}),a&&H.createElement(Ft,null,H.createElement(Tn,{isDone:!0,command:":config:editor",value:i}))))}import Vs from"chalk";import{Box as Rn,Text as Ke}from"ink";import Q from"react";import{Box as Hr,Text as dc}from"ink";import pt from"react";var lc=(e,t)=>e.length<=t?e:t<=1?"\u2026":e.slice(0,t-1)+"\u2026",Ws=({width:e})=>{let{breadCrumb:t,currentNode:n,selectedIndex:r,viewMode:o}=v(),i=F(n.id)[r],a=Ue(i?.id??n.id,"TICKET"),d=Ee(a)?a.value:void 0,u=d?.id?F(d.id):[],m=I=>{let C=u.find(w=>w.title===I);return C?F(C.id).map(w=>typeof w.props?.value=="string"?w.props.value:"").filter(w=>!!w):[]},p=m("Tags"),y=m("Assignees"),N=d?.parentNodeId?!qn(n.id,d?.parentNodeId)&&o==="dense":!1,S=t.map((I,C)=>{let w=C===t.length-1,B=F(I.id),Oe=w?B?.[r]?.title:void 0;return`${C?" / ":""}${I.title??""}${Oe?` \u25B8 ${Oe}`:""}`}).join(""),A=lc(S,e);return pt.createElement(Hr,null,pt.createElement(dc,{color:E.secondary2},A),N?p.map(I=>pt.createElement(Hr,{key:I,paddingLeft:2},pt.createElement(dt,{id:I}))):null,N?y.map(I=>pt.createElement(Hr,{key:I,paddingLeft:2},pt.createElement(at,{id:I}))):null)};import{Box as cc,Text as Hs}from"ink";import wn from"react";var uc=({filters:e})=>wn.createElement(cc,{columnGap:1},wn.createElement(Hs,{color:"red"},"APPLIED FILTERS:"),e.map(({value:t,target:n,operator:r})=>wn.createElement(Hs,{backgroundColor:"black",color:"white"},` ${n}${r}"${t}" `))),js=wn.memo(uc);var Ks="0.4.5";function Mn({filters:e,hideBreadCrumb:t=!1}){let{timeMode:n,eventLog:r,unappliedEvents:o}=$(),{userName:i,preferredEditor:a}=fe(),d=40,u=process.stdout.columns-d-8,m=r.at(-1)?.id,p=Qt(m??""),y=Ee(p)?To(p.value):"INVALID DATE";return Q.createElement(Rn,{justifyContent:"space-between",flexDirection:"row","max-width":process.stdout.columns-40,overflow:"hidden"},t?Q.createElement(Ke,null," "):Q.createElement(Rn,{paddingLeft:1},e.length>0?Q.createElement(js,{filters:e}):Q.createElement(Ws,{width:u})),n==="live"?Q.createElement(Rn,{columnGap:1,paddingRight:2,"max-width":d,overflow:"hidden",justifyContent:"flex-end"},Q.createElement(Ke,{dimColor:!0,color:E.secondary2},Ks+" "),Q.createElement(zs,{icon:"@",value:i}),Q.createElement(zs,{icon:"\u276F",value:a})):"",n==="peek"?Q.createElement(Rn,{paddingLeft:1},Q.createElement(Ke,{backgroundColor:E.yellow}," Readonly "),Q.createElement(Ke,{color:E.yellow}," "+o.length+" edits ago at "),Q.createElement(Ke,{backgroundColor:E.yellow,color:E.accent}," "+y+" "),Q.createElement(Ke,{color:E.yellow},". Resume with "),Q.createElement(Ke,{backgroundColor:E.yellow}," :peek now ")):"")}function zs({icon:e,value:t}){return Q.createElement(Ke,null,Vs.dim(e)+Vs.hex(E.accent)(` ${t??"-"} `))}import{Box as mc,Text as pc}from"ink";import Ot from"react";import{Box as Pn,Text as jr}from"ink";import Ve from"react";function Kr(){let e=$(),t=e.nodes[e.rootNodeId],o=process.stdout.rows-1-3,i=process.stdout.columns||120,a=t?.id?R(t?.id):[];return Ve.createElement(Pn,{flexDirection:"column",height:o,padding:1,borderStyle:"round",borderColor:E.secondary,width:i},Ve.createElement(Pn,{padding:1,paddingTop:0,paddingBottom:0},Ve.createElement(jr,null,"Select a board:")),Ve.createElement(Pn,{padding:1,flexDirection:"column"},a.map((d,u)=>{let m=e.currentNode.context==="WORKSPACE"&&e.selectedIndex===u,y=R(d.id).flatMap(({id:N})=>F(N)).length;return Ve.createElement(Pn,{key:d.id??u},Ve.createElement(jr,{color:m?E.accent:E.secondary2},Ve.createElement(re,{isSelected:m})),Ve.createElement(jr,{color:m?E.accent:E.secondary2},d.title," (",y," issues)",d.readonly?" \u{1F512}":""))})))}var gc=({currentNode:e,selectedIndex:t,breadCrumb:n,mode:r,viewMode:o,height:i,width:a})=>{let{renderedChildrenIndex:d}=$(),u=n.find(({context:N})=>N==="BOARD"),y=i-1-3;return Ot.createElement(mc,{flexDirection:"row"},e.context==="WORKSPACE"?Ot.createElement(Kr,null):u?Ot.createElement(dn,{height:y,width:a,swimlanes:(d[u.id]??[]).filter(N=>N!==void 0&&et(N)),currentNode:e,selectedIndex:t,breadCrumb:n,viewMode:o,mode:r}):Ot.createElement(pc,null))},Gs=Ot.memo(gc);function Vr({width:e,height:t}){let n=$(),r=n.filters;if(n.mode===g.HELP)return q.createElement(Ze,{flexDirection:"column"},q.createElement($s,{width:e}));let{isSetup:o,hasPreferredEditor:i,hasUserName:a,userName:d,preferredEditor:u}=Gt(),m=!o,p=o&&(!n.hasProject||qe());if(m)return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{hideBreadCrumb:!0,filters:r}),q.createElement(Wr,{height:t,width:e,hasUserName:a,hasPreferredEditor:i,userName:d??"",preferredEditor:u??""})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}));if(p)return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{hideBreadCrumb:!0,filters:r}),q.createElement(_s,{height:t,width:e})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}));let y=Ae(v().breadCrumb??[],"BOARD");if(Ee(y)){let N=y.value.id,S=R(N).length,A=3,I=Math.floor(e/A),C=Math.floor(e/Math.max(S,1));e=Math.min(C,I)*Math.max(S,A)}return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{filters:r}),q.createElement(Gs,{width:e,height:t,currentNode:n.currentNode,selectedIndex:n.selectedIndex,breadCrumb:n.breadCrumb,viewMode:n.viewMode,mode:n.mode})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}))}import fc from"readline";var kn,Dn,ye,vc=new Set([x.MoveCursorLeft,x.EraseInputWord,x.MoveCursorLeftOfWord,x.MoveCursorRight,x.MoveCursorRightOfWord,x.NavToPreviousContainer,x.NavToNextContainer,x.NavPreviousItem,x.NavNextItem,x.SetViewDense,x.SetViewWide,x.Confirm,x.Exit,x.InitCommandLine,x.ExitCommandLine,x.CaptureInput,x.EraseInput,x.EraseInputWord,x.HideHelp,x.ViewHelp,x.SetViewDense,x.SetViewWide,x.GetLastCommandFromHistory,x.GetNextCommandFromHistory,x.AutoCompleteCommand]),qs=async e=>{if(e.ctrl&&e.name==="c")return D.exit();let{actionIndex:t,mode:n,readOnly:r}=v(),o=Vo(e,n);if(!o||r&&!vc.has(o))return;let i=t[n]?.[o];if(i?.action)try{await i.action(i,e)}catch(a){logger.error(a)}},xc=()=>async function(t,n){n.name!=="escape"&&(ye&&(clearTimeout(ye),ye=void 0),await qs(n))},yc=()=>async function(t){if(t.length===1&&t[0]===27){ye&&clearTimeout(ye),ye=setTimeout(()=>{qs({name:"escape",ctrl:!1,meta:!1,shift:!1,sequence:"\x1B"}),ye=void 0},25);return}ye&&(clearTimeout(ye),ye=void 0)};function Ys(){kn&&process.stdin.removeListener("keypress",kn),Dn&&process.stdin.removeListener("data",Dn),kn=xc(),Dn=yc(),fc.emitKeypressEvents(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.on("data",Dn),process.stdin.on("keypress",kn)}Ec(`${zr.bold("Epiq CLI")}
|
|
63
|
+
`)):(Wl(),c("State booted successfully",null))}import{Box as sc}from"ink";import _r from"react";import Lt from"chalk";import{Box as Ur,Text as Ms}from"ink";import Dt,{useEffect as jl,useMemo as Kl,useState as Vl}from"react";var Ps=Lt.gray,zl=Lt.inverse,Gl=Lt.inverse.gray,ql={hint:"",hints:[],overlap:0,remainder:""},Ds=({value:e,command:t})=>{if(!t)return null;let n=e.trimStart(),o=e.length-n.length;return e.slice(o,o+t.length)!==t?null:{start:o,end:o+t.length}},Yl=({command:e,modifier:t})=>{if(!t)return null;if(e==="tag"||e==="assign"){let n=X(t);return{bg:r=>Lt.bgHex(n).black(r),bgCursor:r=>Lt.bgHex(n).inverse.black(r)}}return tr(t)},Xl=({value:e,command:t,modifier:n})=>{if(!t||!n)return null;let r=Ds({value:e,command:t});if(!r)return null;let i=e.slice(r.end).match(/^\s*/)?.[0].length??0,a=r.end+i;return e.slice(a,a+n.length)!==n?null:{start:a,end:a+n.length}},ks=()=>({value:J.value,cursorPosition:J.cursorPosition,commandIsPending:J.commandIsPending,autoCompletion:J.commandMeta.autoCompletion??ql,infoMessage:J.commandMeta.infoMessage,validationStatus:J.commandMeta.validity,command:J.commandMeta.command,inputString:J.commandMeta.inputString,modifier:J.commandMeta.modifier}),Jl=(e,t)=>e.value===t.value&&e.cursorPosition===t.cursorPosition&&e.commandIsPending===t.commandIsPending&&e.infoMessage===t.infoMessage&&e.autoCompletion.hint===t.autoCompletion.hint&&e.autoCompletion.overlap===t.autoCompletion.overlap&&e.autoCompletion.remainder===t.autoCompletion.remainder&&e.validationStatus===t.validationStatus&&e.command===t.command&&e.modifier===t.modifier&&e.inputString===t.inputString,Ls=({width:e})=>{let[t,n]=Vl(ks());jl(()=>{let y=()=>{let S=ks();n(A=>Jl(A,S)?A:S)},N=Bo(y);return y(),()=>{N()}},[]);let{value:r,cursorPosition:o,infoMessage:i,commandIsPending:a,autoCompletion:d,command:u,modifier:m}=t,p=Kl(()=>{let y=Math.max(0,Math.min(o,r.length)),N=Ds({value:r,command:u}),S=Xl({value:r,command:u,modifier:m}),A=u?tr(u):null,I=Yl({command:u,modifier:m}),C=(ie,se)=>{let Fn=N&&se>=N.start&&se<N.end,On=S&&se>=S.start&&se<S.end;return Fn&&A?A.fg(ie):On&&I?I.bg(ie):ie},w=(ie,se)=>{let Fn=N&&se>=N.start&&se<N.end,On=S&&se>=S.start&&se<S.end;return Fn&&A?A.fgCursor(ie):On&&I?I.bgCursor(ie):zl(ie)},B=r.slice(0,y),Oe=r[y]??" ",Be=y<r.length?r.slice(y+1):"",Zs=Array.from(B).map((ie,se)=>C(ie,se)).join(""),Gr=w(Oe,y),qr=Array.from(Be).map((ie,se)=>C(ie,y+1+se)).join("");if(d.hint){let ie=d.hint[d.overlap]??Oe;Gr=Gl(ie),qr=Ps(d.remainder.slice(1)+Be)}return Ps(":")+Zs+Gr+qr},[r,o,d,u,m]);return Dt.createElement(Ur,{flexDirection:"column",justifyContent:"flex-start"},Dt.createElement(Ur,{flexDirection:"column",paddingX:1,borderColor:E.secondary,borderStyle:"round",width:e},Dt.createElement(Ur,null,Dt.createElement(Ms,null,p),i&&Dt.createElement(Ms,{wrap:"truncate",color:a?E.red:E.secondary2},` ${i} `))))};import Fs from"chalk";import{Box as Ql,Text as $r}from"ink";import In,{useEffect as Zl,useState as ec}from"react";var tc=["#4c567a","#9d7cd8","#7aa2f7","#7dcfff","#9d7cd8"],Os=e=>{let t=e.replace("#","");return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},nc=({r:e,g:t,b:n})=>{let r=o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0");return`#${r(e)}${r(t)}${r(n)}`},rc=(e,t,n)=>{let r=Os(e),o=Os(t);return nc({r:r.r+(o.r-r.r)*n,g:r.g+(o.g-r.g)*n,b:r.b+(o.b-r.b)*n})},oc=(e,t)=>{if(e.length===1)return e[0];let n=t*(e.length-1),r=Math.floor(n),o=n-r,i=e[r],a=e[Math.min(r+1,e.length-1)];return rc(i,a,o)},ic=(e,t)=>e.length===t?e:e.length>t?e.slice(0,t):e.padEnd(t," "),Bs=({width:e,availableHints:t})=>{let{syncStatus:{status:n,msg:r}}=$(),[o,i]=ec(0);Zl(()=>{if(n!=="syncing"){i(0);return}let C=setInterval(()=>{i(w=>w+1)},50);return()=>clearInterval(C)},[n]);let a=[],d=0;for(let C of t){let B=(a.length>0?" | ":"").length+C.length;if(d+B>e-4)break;a.push(C),d+=B}let u=n!="synced"?r??a.join(" | "):a.join(" | "),m=Math.max(0,e-2),p=n==="syncing"?oc(tc,(Math.sin(o*.12)+1)/2):E.secondary,y=Fs.hex(p??"fff"),N=Fs.hex(E.secondary2),S=y(`\u256D${"\u2500".repeat(m)}\u256E`),A=y(`\u2570${"\u2500".repeat(m)}\u256F`),I=`${y("\u2502")}${N(ic(` ${u} `,m))}${y("\u2502")}`;return In.createElement(Ql,{flexDirection:"column",width:e},In.createElement($r,null,S),In.createElement($r,null,I),In.createElement($r,null,A))};var Sn=({width:e,mode:t,availableHints:n})=>{let r=$(),o=[],i=0;for(let a of n){let u=(o.length>0?" | ":"").length+a.length;if(i+u>e+2)break;o.push(a),i+=u}return _r.createElement(sc,null,t===g.COMMAND_LINE&&r.syncStatus.status!=="syncing"?_r.createElement(Ls,{width:e}):_r.createElement(Bs,{width:e,mode:t,availableHints:n}))};import{Box as mt,Text as Us}from"ink";import He from"react";var $s=({width:e})=>{let t=[...v().availableActions].map(n=>n.description).filter(n=>n!==void 0).map(n=>{let[r,o]=n.split("]"),i=r?.replace("[",""),a=o?.trim();return[i,a]}).filter(n=>n[0]!==void 0&&n[1]!==void 0).sort(([n],[r])=>n.length===1&&r.length!==1?-1:n.length!==1&&r.length===1?1:n.localeCompare(r,void 0,{sensitivity:"base"}));return t.unshift(["Key(s)","Action"]),He.createElement(mt,{flexDirection:"column",marginTop:3,borderColor:E.secondary,borderStyle:"round",width:e,minHeight:19},He.createElement(mt,{flexDirection:"column",width:e},v().mode===g.HELP?t.map(([n,r],o)=>He.createElement(mt,{paddingLeft:1,key:o,flexDirection:"row"},He.createElement(mt,{key:o,flexDirection:"row",paddingBottom:o?0:1},He.createElement(mt,{width:20,justifyContent:"flex-end"},He.createElement(Us,{color:o?E.accent:E.secondary},n)),He.createElement(mt,{flexGrow:1,width:40,paddingLeft:2},He.createElement(Us,{color:o?E.primary:E.secondary},r))))):null))};import ac from"chalk";import{Box as An,Text as je}from"ink";import ge from"react";var _s=({width:e,height:t})=>ge.createElement(An,{height:t-4,flexDirection:"column",width:e,paddingTop:1,paddingLeft:2,borderStyle:"round",borderColor:E.secondary,rowGap:1},ge.createElement(je,{color:E.accent,bold:!0},"Initialize project"),ge.createElement(je,null,`This folder is not an ${ac.hex(E.accent)("epiq")} project yet.`),ge.createElement(je,{color:E.primary},"To start tracking issues here, we need to initialize a new"," ",ge.createElement(je,{color:E.primary,backgroundColor:E.secondary}," .epiq/project.json ")," ","file in this repository."),ge.createElement(An,{marginTop:1,flexDirection:"column"},ge.createElement(An,null,ge.createElement(je,{color:E.accent}," "),ge.createElement(je,{color:E.primary},"Type "),ge.createElement(je,{backgroundColor:E.secondary}," :init "))),ge.createElement(An,{marginTop:1},ge.createElement(je,{color:E.secondary2},"(This will create the local epiq project files)")));import{Box as Ft,Text as xe}from"ink";import H from"react";var Tn=({isDone:e,command:t,value:n})=>H.createElement(Ft,null,H.createElement(xe,{color:E.accent,dimColor:e},e?" \u2714 ":" "),H.createElement(xe,{dimColor:e},"Type "),H.createElement(xe,{backgroundColor:E.secondary,dimColor:e}," "+t+" "),n&&H.createElement(H.Fragment,null,H.createElement(xe,{dimColor:e}," "),H.createElement(xe,{color:E.secondary,dimColor:e},"<"+n+">")));function Wr({width:e,height:t,hasUserName:n,hasPreferredEditor:r,userName:o,preferredEditor:i}){let a=n&&r,d=n?r?null:":config:editor":":config:username";return H.createElement(Ft,{height:t-4,flexDirection:"column",width:e,paddingTop:1,paddingLeft:2,borderStyle:"round",borderColor:E.secondary,rowGap:1},H.createElement(xe,{color:E.accent,bold:!0},"Welcome! \u{1F539}"),H.createElement(xe,null,"Lets get you started - its a breeze."),H.createElement(xe,{color:E.secondary2},"And remember, you can always get help with"," ",H.createElement(xe,{color:E.accent},":help"),"."),!a&&H.createElement(xe,{color:E.secondary2},d===":config:username"?"First, choose your username.":"Nice. One more step."),H.createElement(Ft,{flexDirection:"column"},n&&H.createElement(Ft,{marginBottom:1},H.createElement(Tn,{isDone:!0,command:":config:username",value:o})),!n&&H.createElement(Tn,{isDone:!1,command:":config:username"}),n&&!r&&H.createElement(Tn,{isDone:!1,command:":config:editor"}),a&&H.createElement(Ft,null,H.createElement(Tn,{isDone:!0,command:":config:editor",value:i}))))}import Vs from"chalk";import{Box as Rn,Text as Ke}from"ink";import Q from"react";import{Box as Hr,Text as dc}from"ink";import pt from"react";var lc=(e,t)=>e.length<=t?e:t<=1?"\u2026":e.slice(0,t-1)+"\u2026",Ws=({width:e})=>{let{breadCrumb:t,currentNode:n,selectedIndex:r,viewMode:o}=v(),i=F(n.id)[r],a=Ue(i?.id??n.id,"TICKET"),d=Ee(a)?a.value:void 0,u=d?.id?F(d.id):[],m=I=>{let C=u.find(w=>w.title===I);return C?F(C.id).map(w=>typeof w.props?.value=="string"?w.props.value:"").filter(w=>!!w):[]},p=m("Tags"),y=m("Assignees"),N=d?.parentNodeId?!qn(n.id,d?.parentNodeId)&&o==="dense":!1,S=t.map((I,C)=>{let w=C===t.length-1,B=F(I.id),Oe=w?B?.[r]?.title:void 0;return`${C?" / ":""}${I.title??""}${Oe?` \u25B8 ${Oe}`:""}`}).join(""),A=lc(S,e);return pt.createElement(Hr,null,pt.createElement(dc,{color:E.secondary2},A),N?p.map(I=>pt.createElement(Hr,{key:I,paddingLeft:2},pt.createElement(dt,{id:I}))):null,N?y.map(I=>pt.createElement(Hr,{key:I,paddingLeft:2},pt.createElement(at,{id:I}))):null)};import{Box as cc,Text as Hs}from"ink";import wn from"react";var uc=({filters:e})=>wn.createElement(cc,{columnGap:1},wn.createElement(Hs,{color:"red"},"APPLIED FILTERS:"),e.map(({value:t,target:n,operator:r})=>wn.createElement(Hs,{backgroundColor:"black",color:"white"},` ${n}${r}"${t}" `))),js=wn.memo(uc);var Ks="0.4.6";function Mn({filters:e,hideBreadCrumb:t=!1}){let{timeMode:n,eventLog:r,unappliedEvents:o}=$(),{userName:i,preferredEditor:a}=fe(),d=40,u=process.stdout.columns-d-8,m=r.at(-1)?.id,p=Qt(m??""),y=Ee(p)?To(p.value):"INVALID DATE";return Q.createElement(Rn,{justifyContent:"space-between",flexDirection:"row","max-width":process.stdout.columns-40,overflow:"hidden"},t?Q.createElement(Ke,null," "):Q.createElement(Rn,{paddingLeft:1},e.length>0?Q.createElement(js,{filters:e}):Q.createElement(Ws,{width:u})),n==="live"?Q.createElement(Rn,{columnGap:1,paddingRight:2,"max-width":d,overflow:"hidden",justifyContent:"flex-end"},Q.createElement(Ke,{dimColor:!0,color:E.secondary2},Ks+" "),Q.createElement(zs,{icon:"@",value:i}),Q.createElement(zs,{icon:"\u276F",value:a})):"",n==="peek"?Q.createElement(Rn,{paddingLeft:1},Q.createElement(Ke,{backgroundColor:E.yellow}," Readonly "),Q.createElement(Ke,{color:E.yellow}," "+o.length+" edits ago at "),Q.createElement(Ke,{backgroundColor:E.yellow,color:E.accent}," "+y+" "),Q.createElement(Ke,{color:E.yellow},". Resume with "),Q.createElement(Ke,{backgroundColor:E.yellow}," :peek now ")):"")}function zs({icon:e,value:t}){return Q.createElement(Ke,null,Vs.dim(e)+Vs.hex(E.accent)(` ${t??"-"} `))}import{Box as mc,Text as pc}from"ink";import Ot from"react";import{Box as Pn,Text as jr}from"ink";import Ve from"react";function Kr(){let e=$(),t=e.nodes[e.rootNodeId],o=process.stdout.rows-1-3,i=process.stdout.columns||120,a=t?.id?R(t?.id):[];return Ve.createElement(Pn,{flexDirection:"column",height:o,padding:1,borderStyle:"round",borderColor:E.secondary,width:i},Ve.createElement(Pn,{padding:1,paddingTop:0,paddingBottom:0},Ve.createElement(jr,null,"Select a board:")),Ve.createElement(Pn,{padding:1,flexDirection:"column"},a.map((d,u)=>{let m=e.currentNode.context==="WORKSPACE"&&e.selectedIndex===u,y=R(d.id).flatMap(({id:N})=>F(N)).length;return Ve.createElement(Pn,{key:d.id??u},Ve.createElement(jr,{color:m?E.accent:E.secondary2},Ve.createElement(re,{isSelected:m})),Ve.createElement(jr,{color:m?E.accent:E.secondary2},d.title," (",y," issues)",d.readonly?" \u{1F512}":""))})))}var gc=({currentNode:e,selectedIndex:t,breadCrumb:n,mode:r,viewMode:o,height:i,width:a})=>{let{renderedChildrenIndex:d}=$(),u=n.find(({context:N})=>N==="BOARD"),y=i-1-3;return Ot.createElement(mc,{flexDirection:"row"},e.context==="WORKSPACE"?Ot.createElement(Kr,null):u?Ot.createElement(dn,{height:y,width:a,swimlanes:(d[u.id]??[]).filter(N=>N!==void 0&&et(N)),currentNode:e,selectedIndex:t,breadCrumb:n,viewMode:o,mode:r}):Ot.createElement(pc,null))},Gs=Ot.memo(gc);function Vr({width:e,height:t}){let n=$(),r=n.filters;if(n.mode===g.HELP)return q.createElement(Ze,{flexDirection:"column"},q.createElement($s,{width:e}));let{isSetup:o,hasPreferredEditor:i,hasUserName:a,userName:d,preferredEditor:u}=Gt(),m=!o,p=o&&(!n.hasProject||qe());if(m)return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{hideBreadCrumb:!0,filters:r}),q.createElement(Wr,{height:t,width:e,hasUserName:a,hasPreferredEditor:i,userName:d??"",preferredEditor:u??""})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}));if(p)return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{hideBreadCrumb:!0,filters:r}),q.createElement(_s,{height:t,width:e})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}));let y=Ae(v().breadCrumb??[],"BOARD");if(Ee(y)){let N=y.value.id,S=R(N).length,A=3,I=Math.floor(e/A),C=Math.floor(e/Math.max(S,1));e=Math.min(C,I)*Math.max(S,A)}return q.createElement(Ze,{flexDirection:"column"},q.createElement(Ze,{flexDirection:"column"},q.createElement(Mn,{filters:r}),q.createElement(Gs,{width:e,height:t,currentNode:n.currentNode,selectedIndex:n.selectedIndex,breadCrumb:n.breadCrumb,viewMode:n.viewMode,mode:n.mode})),q.createElement(Sn,{width:e,mode:n.mode,availableHints:n.availableHints}))}import fc from"readline";var kn,Dn,ye,vc=new Set([x.MoveCursorLeft,x.EraseInputWord,x.MoveCursorLeftOfWord,x.MoveCursorRight,x.MoveCursorRightOfWord,x.NavToPreviousContainer,x.NavToNextContainer,x.NavPreviousItem,x.NavNextItem,x.SetViewDense,x.SetViewWide,x.Confirm,x.Exit,x.InitCommandLine,x.ExitCommandLine,x.CaptureInput,x.EraseInput,x.EraseInputWord,x.HideHelp,x.ViewHelp,x.SetViewDense,x.SetViewWide,x.GetLastCommandFromHistory,x.GetNextCommandFromHistory,x.AutoCompleteCommand]),qs=async e=>{if(e.ctrl&&e.name==="c")return D.exit();let{actionIndex:t,mode:n,readOnly:r}=v(),o=Vo(e,n);if(!o||r&&!vc.has(o))return;let i=t[n]?.[o];if(i?.action)try{await i.action(i,e)}catch(a){logger.error(a)}},xc=()=>async function(t,n){n.name!=="escape"&&(ye&&(clearTimeout(ye),ye=void 0),await qs(n))},yc=()=>async function(t){if(t.length===1&&t[0]===27){ye&&clearTimeout(ye),ye=setTimeout(()=>{qs({name:"escape",ctrl:!1,meta:!1,shift:!1,sequence:"\x1B"}),ye=void 0},25);return}ye&&(clearTimeout(ye),ye=void 0)};function Ys(){kn&&process.stdin.removeListener("keypress",kn),Dn&&process.stdin.removeListener("data",Dn),kn=xc(),Dn=yc(),fc.emitKeypressEvents(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.on("data",Dn),process.stdin.on("keypress",kn)}Ec(`${zr.bold("Epiq CLI")}
|
|
64
64
|
|
|
65
65
|
${zr.dim("Boot in directory:")}
|
|
66
66
|
${zr.cyan("$ epiq")}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -111,11 +111,28 @@ epiq
|
|
|
111
111
|
|
|
112
112
|
If it is your first run, this opens the interactive setup wizard that sets you up in about 30 seconds.
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
This creates settings in `~/.epiq-global/**`.
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
If the current folder is not yet an Epiq project, you will see an initialization screen.
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Initialization will:
|
|
119
|
+
|
|
120
|
+
Create a project anchor:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
.epiq/project.json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Create local state directories:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
.epiq/events/
|
|
130
|
+
.epiq/logs/
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Update your `.gitignore` to ignore local-only directories (`.epiq/events/`, `.epiq/logs/`)
|
|
134
|
+
|
|
135
|
+
> When synced, Epiq will execute git commands on your behalf, targeting a dedicated state branch
|
|
119
136
|
|
|
120
137
|
## Usage Guide
|
|
121
138
|
|
|
@@ -166,9 +183,7 @@ Clear all filters with `:filter clear`
|
|
|
166
183
|
Epiq uses Git in the background to synchronize state between clients. No manual git commands are required to make it work. Running `:sync` pulls and pushes changes between your local state and the remote state.
|
|
167
184
|
|
|
168
185
|
- Your issue data is stored in a dedicated branch managed automatically by epiq
|
|
169
|
-
- A
|
|
170
|
-
|
|
171
|
-
The `.epiq/` folder is non-authoritative and used for caching and local tracking. Epiq automatically ensures it is gitignored on every sync.
|
|
186
|
+
- A `.epiq/` folder is created in your project, containing both shared project metadata and local state.
|
|
172
187
|
|
|
173
188
|
## Conflict Avoidance & Data Integrity
|
|
174
189
|
|