blade-code 0.10.82 → 0.10.84
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/blade.js +2 -2
- package/dist/{chunk-shq0pkxq.js → chunk-01zar8q6.js} +1 -1
- package/dist/{chunk-33bpwkyk.js → chunk-0q5bz3nm.js} +2 -2
- package/dist/{chunk-htsrecy5.js → chunk-0xd2q6xj.js} +1 -1
- package/dist/{chunk-sghq0p21.js → chunk-1zn0yfkf.js} +1 -1
- package/dist/{chunk-zkhb55jz.js → chunk-272swnyr.js} +1 -1
- package/dist/chunk-2cbkr660.js +1 -0
- package/dist/chunk-3083qhmh.js +1 -0
- package/dist/{chunk-3e0dry5e.js → chunk-3htjbswb.js} +3 -3
- package/dist/{chunk-mygw13zd.js → chunk-44dzrn0p.js} +1 -1
- package/dist/{chunk-vpcpcwyq.js → chunk-4mevry12.js} +2 -2
- package/dist/{chunk-bhe154zk.js → chunk-58021qed.js} +56 -56
- package/dist/chunk-5ehcky33.js +6 -0
- package/dist/{chunk-6v2eawp6.js → chunk-5zqdgwrx.js} +1 -1
- package/dist/{chunk-h0fh3j9w.js → chunk-6jsmac0q.js} +1 -1
- package/dist/chunk-7jp7e0zj.js +1 -0
- package/dist/{chunk-pfvgkexe.js → chunk-7m5q8vxf.js} +1 -1
- package/dist/{chunk-b9nhnzaj.js → chunk-7rfhmbqw.js} +1 -1
- package/dist/chunk-7s0crdpp.js +1 -0
- package/dist/{chunk-sj0k8cdf.js → chunk-83caxxbt.js} +1 -1
- package/dist/chunk-84kwsrcv.js +118 -0
- package/dist/{chunk-gdxm7yz5.js → chunk-86e21rqs.js} +2 -2
- package/dist/{chunk-25yvyn7q.js → chunk-8jfk34vk.js} +1 -1
- package/dist/{chunk-bb1d4r3r.js → chunk-9t99f87v.js} +1 -1
- package/dist/chunk-a129n4rb.js +1 -0
- package/dist/{chunk-411ewxte.js → chunk-a17x4y58.js} +2 -2
- package/dist/{chunk-seamt0j3.js → chunk-b2p9qm6j.js} +2 -2
- package/dist/chunk-d1x4n3q3.js +10 -0
- package/dist/{chunk-skw3b17a.js → chunk-d2pwwdab.js} +1 -1
- package/dist/{chunk-091qx62q.js → chunk-e1ry8aj5.js} +1 -1
- package/dist/chunk-ev4swr8g.js +1 -0
- package/dist/{chunk-bpgyafzm.js → chunk-fa20qwhr.js} +2 -2
- package/dist/{chunk-b9vm7gns.js → chunk-ffa6hhee.js} +2 -2
- package/dist/{chunk-jdb2mwbn.js → chunk-fv8b98tz.js} +2 -2
- package/dist/{chunk-c9e0fbyh.js → chunk-g9xjcfrf.js} +1 -1
- package/dist/{chunk-n94a42wh.js → chunk-gc2xnw9g.js} +1 -1
- package/dist/{chunk-1mc7nfb4.js → chunk-gd2sw9zm.js} +1 -1
- package/dist/chunk-h5pexxkw.js +1 -0
- package/dist/{chunk-e0ebj41c.js → chunk-hepfsgx5.js} +2 -2
- package/dist/chunk-hg8d4vhj.js +2 -0
- package/dist/{chunk-eeb2945p.js → chunk-hjr9r44k.js} +1 -1
- package/dist/chunk-j0ma9as0.js +1 -0
- package/dist/{chunk-fsm3fb2m.js → chunk-jf4bxxyf.js} +1 -1
- package/dist/{chunk-gre57x9m.js → chunk-jndq361v.js} +1 -1
- package/dist/{chunk-rkp180w6.js → chunk-kat6tef6.js} +325 -320
- package/dist/{chunk-h6a0nct6.js → chunk-m5f934fh.js} +1 -1
- package/dist/{chunk-3kggy7we.js → chunk-m62t9s2x.js} +1 -1
- package/dist/{chunk-n57jybv7.js → chunk-ny3ykftf.js} +1 -1
- package/dist/{chunk-217cy9g5.js → chunk-p72my37n.js} +2 -2
- package/dist/{chunk-cvy0pd00.js → chunk-q86z54xg.js} +2 -2
- package/dist/{chunk-jwx10h5z.js → chunk-r77pcb0f.js} +2 -2
- package/dist/chunk-rf3g9kkv.js +1 -0
- package/dist/{chunk-0a0sj79a.js → chunk-rwvaapta.js} +2 -2
- package/dist/{chunk-0141jad7.js → chunk-sb84vdcf.js} +1 -1
- package/dist/{chunk-0ra945vt.js → chunk-shr5cg46.js} +2 -2
- package/dist/{chunk-qxn5bg5k.js → chunk-sk8h4m9m.js} +1 -1
- package/dist/{chunk-h3w814js.js → chunk-skg520wq.js} +2 -2
- package/dist/chunk-smrxrd3w.js +1 -0
- package/dist/{chunk-jzvbjn6e.js → chunk-sr4zv59p.js} +1 -1
- package/dist/{chunk-5nfc0j4f.js → chunk-sv7wey68.js} +2 -2
- package/dist/{chunk-5nezhmnq.js → chunk-t1633e8m.js} +2 -2
- package/dist/{chunk-qka2h00j.js → chunk-tmbhspse.js} +12 -11
- package/dist/{chunk-ky9q53m7.js → chunk-tpxs85cg.js} +1 -1
- package/dist/chunk-tv6brgn1.js +1 -0
- package/dist/{chunk-pajdvkxa.js → chunk-vb0af8db.js} +1 -1
- package/dist/chunk-w2sb1hy9.js +1 -0
- package/dist/{chunk-877traav.js → chunk-wr5xpc0t.js} +1 -1
- package/dist/{chunk-7nx0pzfk.js → chunk-ww51801m.js} +1 -1
- package/dist/chunk-x2rraka3.js +1 -0
- package/dist/chunk-xj65p2sn.js +1 -0
- package/dist/{chunk-8gfwva8m.js → chunk-ypd8hctc.js} +4 -4
- package/dist/{chunk-6at3v7hd.js → chunk-z4vbah7d.js} +2 -2
- package/dist/web/assets/{ChatView-tu6nu0Yw.js → ChatView-DRn47Y3l.js} +3 -3
- package/dist/web/assets/{CodeBlockHighlighter-DFj0ZWq6.js → CodeBlockHighlighter-DxATdO6i.js} +1 -1
- package/dist/web/assets/{FilePreview-CLJNHlXO.js → FilePreview-D21mo4fn.js} +1 -1
- package/dist/web/assets/{KanbanBoard-B63UlcNr.js → KanbanBoard-DEUuLh0H.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-D7ap0LLK.js → MarkdownRenderer-BA9VgOyM.js} +3 -3
- package/dist/web/assets/{SettingsModal-B8Gp0bXw.js → SettingsModal-CXq3qDgQ.js} +1 -1
- package/dist/web/assets/{TaskSwitcher-gxALR-zu.js → TaskSwitcher-CUcZEUQH.js} +1 -1
- package/dist/web/assets/{TerminalPanel-dnC4oh4w.js → TerminalPanel-CcC6f3H_.js} +1 -1
- package/dist/web/assets/{index-Dn4vZglG.js → index-CfVQVVVI.js} +3 -3
- package/dist/web/assets/{teamService-CoJLtqAq.js → teamService-BX1zdQBb.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/chunk-0wk1byp5.js +0 -1
- package/dist/chunk-3n08j1xh.js +0 -1
- package/dist/chunk-4mpwdcfd.js +0 -10
- package/dist/chunk-6adxyred.js +0 -1
- package/dist/chunk-7t41dza5.js +0 -1
- package/dist/chunk-c3vqqs0r.js +0 -1
- package/dist/chunk-gn6ftvjy.js +0 -1
- package/dist/chunk-gw1za0rb.js +0 -1
- package/dist/chunk-h9xayrwp.js +0 -1
- package/dist/chunk-jdzgkdse.js +0 -1
- package/dist/chunk-kpfbbh24.js +0 -1
- package/dist/chunk-m0dt3w7w.js +0 -112
- package/dist/chunk-ndnjmy45.js +0 -1
- package/dist/chunk-qky3qehm.js +0 -6
- package/dist/chunk-qvtstj28.js +0 -1
- package/dist/chunk-reakyamv.js +0 -2
- package/dist/chunk-rpbyc2k4.js +0 -1
- package/dist/chunk-xqnfzt9g.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bf as b1,cf as L0,df as z1,if as N0}from"./chunk-sr4zv59p.js";import{nf as jO,of as wO}from"./chunk-ww51801m.js";import{rf as A1}from"./chunk-7rfhmbqw.js";import{sf as b0,uf as J0}from"./chunk-3htjbswb.js";import{Bg as I0,wg as S0,xg as GO}from"./chunk-q86z54xg.js";import{Fg as u,Hg as L,Kg as c1}from"./chunk-sk8h4m9m.js";import{Tg as M}from"./chunk-sb84vdcf.js";import{th as k,uh as S}from"./chunk-ffa6hhee.js";import{Hh as u0}from"./chunk-a17x4y58.js";import{Oh as N}from"./chunk-rwvaapta.js";import H1 from"node:path";import LO from"node:path";import v0 from"node:fs";import W0 from"node:os";import E from"node:path";import dO from"yaml";var U1=2000,V1=50,j1=1000,Y4={type:"object",properties:{verdict:{type:"string",enum:["pass","fail","partial"]},summary:{type:"string",minLength:1,maxLength:U1},findings:{type:"array",maxItems:V1,items:{type:"string",minLength:1,maxLength:j1}}},required:["verdict","summary","findings"],additionalProperties:!1};function F1(O,$){let Q=O.trim().replaceAll(/\s+/g," ");if($)Q=Q.replaceAll($,".");return Q.replace(/\bBearer\s+[^\s"'`]+/gi,"Bearer [redacted]").replace(/\bsk-[A-Za-z0-9_-]{8,}\b/g,"[redacted-key]").replace(/\b(api(?:[_-]?|\s+)key|access(?:[_-]?|\s+)token|authorization|cookie|password|passwd|refresh(?:[_-]?|\s+)token|secret|session(?:[_-]?|\s+)token)\b(\s*[:=]\s*)([^\s,;]+)/gi,"$1$2[redacted]")}function hO(O){if(O.length<=N0)return O;let $=" [verification feedback truncated]",Q=O.slice(0,N0-$.length);if(/[\uD800-\uDBFF]$/.test(Q))Q=Q.slice(0,-1);return Q.trimEnd()+$}function B1(O){if(!O||typeof O!=="object"||Array.isArray(O))return;let $=O;if($.verdict!=="pass"&&$.verdict!=="fail"&&$.verdict!=="partial"||typeof $.summary!=="string"||!$.summary.trim()||$.summary.length>U1||!Array.isArray($.findings)||$.findings.length>V1||!$.findings.every((Q)=>typeof Q==="string"&&Q.trim().length>0&&Q.length<=j1))return;return{verdict:$.verdict,summary:$.summary.trim(),findings:$.findings.map((Q)=>Q.trim())}}function X4(O,$){let Q=B1(O);if(!Q)return;let Z=F1(Q.summary,$),J=Q.findings.map((K)=>F1(K,$));return hO([Z,J.length>0?`Findings:
|
|
2
2
|
${J.map((K)=>`- ${K}`).join(`
|
|
3
3
|
`)}`:""].filter(Boolean).join(`
|
|
4
4
|
|
|
@@ -722,4 +722,4 @@ ${Z.join(`
|
|
|
722
722
|
</${Q}>`:"";return{content:K,files:[...O],references:O.map(O4),triggerPaths:[...$],contentBytes:Buffer.byteLength(K,"utf8"),provenanceSha256:w0(O.map((q)=>`${q.id}:${q.contentSha256}`).join(`
|
|
723
723
|
`))}}function AO(O,$){let Q=$,Z=[];for(let J=O.length-1;J>=0;J-=1){let K=O[J];if(!K)continue;let q=Buffer.byteLength(K.content,"utf8");if(q>Q)continue;Z.push(K),Q-=q}return Z.reverse()}class m{projectRoot;catalogSha256;definitions;byId;constructor(O,$=[]){this.projectRoot=O;this.projectRoot=K1(O),this.definitions=Object.freeze([...$].sort(L1).map((Q)=>Object.freeze({...Q}))),this.byId=new Map(this.definitions.map((Q)=>[Q.id,Q])),this.catalogSha256=w0(this.definitions.map((Q)=>`${Q.id}:${Q.contentSha256}`).join(`
|
|
724
724
|
`))}static empty(O){return new m(O)}list(){return this.definitions.map((O)=>({id:O.id,relativePath:O.relativePath,source:O.source,kind:O.kind,conditional:O.conditional,contentSha256:O.contentSha256}))}snapshot(){return new m(this.projectRoot,this.definitions.map((O)=>({...O,patterns:O.patterns?[...O.patterns]:void 0})))}staticRules(O,$=c$){if(this.definitions.length===0)return q0([],[],"project-instructions");let Q=this.relativeSourcePath(O),Z=this.definitions.filter((J)=>!J.conditional&&G1(J.scopeDirectory,Q));return q0(AO(Z,$),[],"project-instructions")}contextualRules(O,$,Q,Z=l$){if(this.definitions.length===0)return q0([],[],"contextual-project-instructions");let J=this.relativeSourcePath(O),K=[...new Set($.map((G)=>W1(z.relative(this.projectRoot,K1(G)))).filter(Y1))].sort(),q=new Map;for(let G of K)for(let Y of this.definitions){if(Q.has(Y.id))continue;if(!G1(Y.scopeDirectory,G))continue;if(Y.conditional){let X=z.posix.relative(Y.scopeDirectory||".",G);if(!Y.patterns?.some((U)=>xO(U,{dot:!0})(X)))continue}else if(G1(Y.scopeDirectory,J))continue;q.set(Y.id,Y)}let W=AO([...q.values()].sort(L1),Z);return q0(W,K,"contextual-project-instructions")}hydrate(O){let $=O.map((Q)=>{let Z=this.byId.get(Q.id);if(!Z||Z.contentSha256!==Q.contentSha256||Z.relativePath!==Q.relativePath||Z.source!==Q.source)throw Error(`Project rule provenance mismatch: ${Q.relativePath}`);return Z});return q0([...new Map($.map((Q)=>[Q.id,Q])).values()].sort(L1),[],"contextual-project-instructions")}relativeSourcePath(O){let $=W1(z.relative(this.projectRoot,K1(O)));if($&&!Y1($))throw Error("Project instruction source is outside the catalog root");return $}}async function $4(O,$){let Q=await d.lstat($);if(!Q.isFile()||Q.isSymbolicLink())throw Error("Project rule must be a regular file");if(Q.size>zO)throw Error(`Project rule exceeds ${zO} bytes`);let Z=await d.realpath($),J=W1(z.relative(O,Z));if(!Y1(J))throw Error("Project rule escapes its repository root");let K=await d.readFile(Z,"utf8");if(TO(K))throw Error("Project rule contains hidden control characters");let q=u$(K),W=q.content.trim();if(!W)throw Error("Project rule content must not be empty");let G=r$(q.data.paths),Y=e$(J),X=w0(JSON.stringify({relativePath:J,patterns:G??[],content:W}));return{id:`${Y.source}:${w0(J).slice(0,20)}`,relativePath:J,source:Y.source,kind:Y.kind,scopeDirectory:Y.scopeDirectory,priority:Y.priority,conditional:Boolean(G),...G?{patterns:G}:{},content:W,contentSha256:X}}async function _O(O,$){let Q=t$(O);if(!$.projectTrusted)return m.empty(Q);let Z=await d.realpath(Q),J=g$.stream([...o$],{cwd:Z,absolute:!0,dot:!0,deep:s$,onlyFiles:!0,followSymbolicLinks:!1,unique:!0,ignore:[...a$]}),K=[];for await(let Y of J)if(K.push(Y.toString()),K.length>SO)throw Error(`Project rule catalog exceeds ${SO} files`);K.sort();let q=new Set(K.filter((Y)=>z.basename(Y)==="AGENTS.override.md").map((Y)=>z.dirname(Y))),W=[],G=0;for(let Y of K){if(z.basename(Y)==="AGENTS.md"&&q.has(z.dirname(Y)))continue;try{let X=await $4(Z,Y);if(G+=Buffer.byteLength(X.content,"utf8"),G>MO)throw Error(`Project rule catalog exceeds ${MO} bytes`);W.push(X)}catch(X){i$.warn(`[ProjectRules] Ignoring rule: ${X instanceof Error?X.message:String(X)}`)}}return new m(Z,W)}var DO=32,D0=64;class CO extends Error{capacity=D0;constructor(){super(`Workspace agent resource capacity is full (${D0})`);this.name="WorkspaceAgentResourceCapacityError"}}var x=new Map,X1=0,NO=[];async function Q4(O){let $=await N.getInstance().getStatus(O.workspaceRoot);O.communicationStyles=await q1(O.workspaceRoot,{projectTrusted:$.state==="trusted",plugins:O.plugins.getActive()})}function Z4(O){let $={...O};for(let Q of Object.values(b0))$[Q]=(O[Q]??[]).map((Z)=>({...Z,matcher:Z.matcher?{...Z.matcher}:void 0,hooks:Z.hooks.map((J)=>({...J}))}));return $}function J5(O){NO=[...new Set(O.map(($)=>H1.resolve($)))]}function EO(O,$){YO(O,$.plugins),C.releaseInstance(O,$.subagents),P.releaseInstance({cwd:O},$.skills),T.releaseInstance(O,$.commands),D.releaseInstance(O,$.plugins)}function vO(O){EO(O.workspaceRoot,O)}function K0(){while(x.size>DO){let O=!1;for(let[$,Q]of x){if(!Q.resources||Q.users>0)continue;if(x.get($)!==Q)continue;x.delete($),vO(Q.resources),O=!0;break}if(!O)return}}function J4(O){setImmediate(()=>{O.users=Math.max(0,O.users-1),K0()}).unref?.()}async function q4(O,$){let Q=await N.getInstance().getStatus(O),Z=o(O),J=g({cwd:O}),K=T.getInstance(O),q=Q0(O);try{if(Z.getAllNames().length===0)Z.loadFromStandardLocations(Q.state==="trusted");await Promise.all([J.initialize(),K.isInitialized()?void 0:K.initialize(O),q.isInitialized()?void 0:q.initialize(O,[...$.cliPluginDirs??NO])]),A0(O),await Z1(O);let W=await q1(O,{projectTrusted:Q.state==="trusted",plugins:q.getActive()}),G=await _O(O,{projectTrusted:Q.state==="trusted"});return{workspaceRoot:O,subagents:Z,skills:J,commands:K,plugins:q,communicationStyles:W,projectRules:G}}catch(W){throw EO(O,{subagents:Z,skills:J,commands:K,plugins:q}),W}}function K4(O,$){let Q={generation:X1,users:0};return Q.promise=q4(O,$).then((Z)=>{if(Q.generation!==X1||x.get(O)!==Q)return vO(Z),Z;return Q.resources=Z,K0(),Z},(Z)=>{if(x.get(O)===Q)x.delete(O);throw Z}),x.set(O,Q),Q}async function RO(O,$){let Q=H1.resolve(O),Z=x.get(Q);if(!Z){if(K0(),x.size>=D0)throw new CO;Z=K4(Q,$)}else x.delete(Q),x.set(Q,Z);Z.users++;let J;try{J=await Z.promise}catch(K){throw Z.users=Math.max(0,Z.users-1),K0(),K}return{entry:Z,resources:J}}async function yO(O,$){if(!$)return;A0(O.workspaceRoot),await Z1(O.workspaceRoot),await Q4(O)}async function q5(O,$={}){let Q=await RO(O,$);try{return await yO(Q.resources,$.reconcilePlugins),Q.resources}finally{J4(Q.entry)}}async function K5(O,$,Q={}){let Z=await RO(O,Q);try{return await yO(Z.resources,Q.reconcilePlugins),await $(Z.resources)}finally{Z.entry.users=Math.max(0,Z.entry.users-1),K0()}}function G5(){let O=0,$=0;for(let Q of x.values()){if(Q.resources)O++;$+=Q.users}return{capacity:DO,activeCapacity:D0,entries:x.size,initialized:O,inFlight:x.size-O,activeUsers:$}}function L5(O){let $="projectRoot"in O?O.projectRoot:O.workspaceRoot;return{projectRoot:H1.resolve($),subagents:O.subagents.snapshot(),skills:O.skills.snapshot(),commands:O.commands.snapshot(),communicationStyles:O.communicationStyles?.snapshot()??wO.snapshot(),projectRules:O.projectRules?.snapshot()??m.empty($),hooks:Z4("hooks"in O&&O.hooks?O.hooks:J0.getInstance().getConfig($))}}function W5(){X1++;for(let[O,$]of x)if($.resources)A0(O);x.clear(),C.resetInstances(),P.resetInstance(),T.resetInstance(),D.resetInstance()}
|
|
725
|
-
export{Y4 as
|
|
725
|
+
export{Y4 as Be,X4 as Ce,H4 as De,M1 as Ee,B4 as Fe,S4 as Ge,o as He,y4 as Ie,w1 as Je,g as Ke,T as Le,r0 as Me,M0 as Ne,D as Oe,Q0 as Pe,Z1 as Qe,A0 as Re,m as Se,DO as Te,D0 as Ue,CO as Ve,Q4 as We,J5 as Xe,q5 as Ye,K5 as Ze,G5 as _e,L5 as $e,W5 as af};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var I=600000,r=30000,t=3600000,o=12,O=15000,P=60000;function R(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=30000&&_<=3600000}var C=1e4,M=1000,p=300000;function E(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=1000&&_<=300000}var T=1,s=16,n=Number.MAX_SAFE_INTEGER,D=180000,m=1000,x=600000,S=134217728,U=65536,V=134217728;function A(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=1&&_<=16}function w(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=1&&_<=n}function z(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=1000&&_<=600000}function F(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=65536&&_<=134217728}
|
|
2
|
-
export{I as
|
|
2
|
+
export{I as Ug,r as Vg,t as Wg,o as Xg,O as Yg,P as Zg,R as _g,C as $g,M as ah,p as bh,E as ch,T as dh,s as eh,n as fh,D as gh,m as hh,x as ih,S as jh,U as kh,V as lh,A as mh,w as nh,z as oh,F as ph};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-wr5xpc0t.js";import"./chunk-a17x4y58.js";import"./chunk-6jsmac0q.js";export{b as setSkipUntilVersion,d as performUpgrade,c as getUpgradeCommand,e as checkVersionOnStartup,a as checkVersion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-6jsmac0q.js";var d={command:"install [target]",describe:"Install Blade native build. Use [target] to specify version (stable, latest, or specific version)",builder:(b)=>{return b.positional("target",{describe:"Version to install",type:"string",default:"stable",choices:["stable","latest"]}).option("force",{type:"boolean",describe:"Force reinstall",default:!1}).example([["$0 install","Install stable version"],["$0 install latest","Install latest version"],["$0 install --force","Force reinstall stable version"]])},handler:async(b)=>{console.log(`Installing Blade ${b.target}...`);try{if(b.force)console.log("Force reinstall enabled");console.log("Downloading..."),console.log("Installing..."),console.log("Installation completed successfully")}catch(c){console.error(`Error: Installation failed: ${c instanceof Error?c.message:"未知错误"}`),process.exit(1)}}};export{d as installCommands};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as i}from"./chunk-
|
|
1
|
+
import{l as i}from"./chunk-01zar8q6.js";import{Tg as s}from"./chunk-sb84vdcf.js";import"./chunk-shr5cg46.js";import"./chunk-6jsmac0q.js";import m from"node:path";var r={registry:i,currentWorkspace:s,inputCwd:()=>process.cwd(),write:console.log};function c(t,e){return m.resolve(e.inputCwd(),t)}function p(t){return t.map((e)=>{let o=e.isCurrent?"*":" ",n=e.gitBranch?` · ${e.gitBranch}`:"",d=e.available?"":" · unavailable";return`${o} ${e.name}${n}${d}
|
|
2
2
|
${e.path}`}).join(`
|
|
3
3
|
`)}async function l(t,e=r){let o=await e.registry.list(e.currentWorkspace());return e.write(t.json?JSON.stringify(o,null,2):p(o)),o}async function u(t,e=r){let o=await e.registry.bind(c(t.path,e),e.currentWorkspace());return e.write(t.json?JSON.stringify(o,null,2):`Bound project: ${o.path}`),o}async function j(t,e=r){let o=c(t.path,e),n=await e.registry.unbind(o);return e.write(t.json?JSON.stringify({path:o,removed:n},null,2):n?`Unbound project: ${o}`:`Project was not bound: ${o}`),n}var a={type:"boolean",default:!1,describe:"Print machine-readable JSON"},P={command:"list",aliases:["ls"],describe:"List bound projects",builder:(t)=>t.option("json",a),handler:async(t)=>{await l(t)}},b={command:"add <path>",aliases:["bind"],describe:"Bind a project folder",builder:(t)=>t.positional("path",{type:"string",demandOption:!0,describe:"Absolute or relative project folder"}).option("json",a),handler:async(t)=>{await u(t)}},h={command:"remove <path>",aliases:["rm","unbind"],describe:"Unbind a project folder",builder:(t)=>t.positional("path",{type:"string",demandOption:!0,describe:"Absolute or relative project folder"}).option("json",a),handler:async(t)=>{await j(t)}},y={command:"projects",aliases:["project"],describe:"Manage project bindings shared with Blade Web",builder:(t)=>t.command(P).command(b).command(h).demandCommand(1,"Choose list, add, or remove"),handler:()=>{return}};export{j as runProjectsRemove,l as runProjectsList,u as runProjectsAdd,y as projectsCommands,p as formatProjectList};
|