@ciandt-flow/cli 2.9.0-beta.29 → 2.9.1-beta.30
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -202,7 +202,7 @@ This will run: ${i}
|
|
|
202
202
|
`),process.stdout.write(R.dim(" Starter Kit: ")+b(e.starterKit??"not set")+`
|
|
203
203
|
`),process.stdout.write(R.dim(" Config: ")+b(await rl())+`
|
|
204
204
|
`),process.stdout.write(`
|
|
205
|
-
`),0):(process.stdout.write(R.yellow(" \u26A0 Session expired. Run `flow auth login` to re-authenticate.\n")),0):(process.stdout.write(R.yellow(" \u26A0 Not authenticated. Run `flow auth login` to set up.\n")),0)}j();U();He();U();var kD=[le,"flow-harness"];function Pg(e){return e!==void 0&&e!==""&&e!=="0"&&e.toLowerCase()!=="false"}function PD(e,a,o=process.env){return Pg(o.DISABLE_AUTOUPDATER)?{name:e,enabled:false,reason:"env-disabled"}:Pg(o.FORCE_AUTOUPDATE_PLUGINS)?{name:e,enabled:true,reason:"env-forced"}:a?.autoUpdate===false?{name:e,enabled:false,reason:"flag"}:a?.autoUpdate===true?{name:e,enabled:true,reason:"flag"}:{name:e,enabled:true,reason:"default"}}function Dg(e){switch(e.reason){case "env-disabled":return "DISABLE_AUTOUPDATER is set";case "env-forced":return "FORCE_AUTOUPDATE_PLUGINS is set";case "flag":return e.enabled?"autoUpdate: true":"autoUpdate: false";case "default":return "default (no explicit flag)"}}function Bs(e=process.env){let a=Uo();if(!we__default.existsSync(a))return [];try{let o=JSON.parse(we__default.readFileSync(a,"utf-8"));return Object.entries(o).map(([t,r])=>PD(t,r,e))}catch{return []}}function wg(){let e=Uo(),a={fixed:[],skipped:[]};if(!we__default.existsSync(e))return a;let o;try{o=JSON.parse(we__default.readFileSync(e,"utf-8"));}catch{return a.skipped.push({name:"(all)",reason:"known_marketplaces.json is malformed JSON"}),a}let t=false;for(let r of kD){let i=o[r];if(!i){a.skipped.push({name:r,reason:"not registered on this machine"});continue}if("autoUpdate"in i){a.skipped.push({name:r,reason:i.autoUpdate?"already autoUpdate: true":"explicitly set to autoUpdate: false \u2014 not overridden"});continue}i.autoUpdate=true,a.fixed.push(r),t=true;}if(t){let r=`${e}.${randomUUID()}.tmp`;we__default.writeFileSync(r,JSON.stringify(o,null,2),{encoding:"utf-8",mode:384}),we__default.renameSync(r,e);}return a}async function DD(e){let a=ne(),o;try{o=await eo(e.source);}catch(r){if(e.source)throw r;o=[];}let t=new Set(a.map(r=>r.name));return S(w.CLI_CATALOG_VIEWED,{interface:Z().interfaceType,filter_type:"available",result_count:o.length}).catch(()=>{}),e.json?(go(o.map(r=>({...r,installed:t.has(r.name)}))),0):(kt(["","Name","Version","Category","Status"],o.map(r=>[t.has(r.name)?"*":" ",r.name??"",r.version??"n/a",r.category??"",t.has(r.name)?"installed":"available"])),0)}async function wD(e){let a=ne(),o=await eo(e.source),t=new Map(o.map(i=>[i.name,i])),r=a.map(i=>{let s=t.get(i.name);return s&&i.version&&s.version&&Ue(i.version,s.version)?{...i,availableVersion:s.version}:null}).filter(i=>i!==null);return S(w.CLI_CATALOG_VIEWED,{interface:Z().interfaceType,filter_type:"outdated",result_count:r.length}).catch(()=>{}),r.length===0?(D("All plugins are up to date."),0):
|
|
205
|
+
`),0):(process.stdout.write(R.yellow(" \u26A0 Session expired. Run `flow auth login` to re-authenticate.\n")),0):(process.stdout.write(R.yellow(" \u26A0 Not authenticated. Run `flow auth login` to set up.\n")),0)}j();U();He();U();var kD=[le,"flow-harness"];function Pg(e){return e!==void 0&&e!==""&&e!=="0"&&e.toLowerCase()!=="false"}function PD(e,a,o=process.env){return Pg(o.DISABLE_AUTOUPDATER)?{name:e,enabled:false,reason:"env-disabled"}:Pg(o.FORCE_AUTOUPDATE_PLUGINS)?{name:e,enabled:true,reason:"env-forced"}:a?.autoUpdate===false?{name:e,enabled:false,reason:"flag"}:a?.autoUpdate===true?{name:e,enabled:true,reason:"flag"}:{name:e,enabled:true,reason:"default"}}function Dg(e){switch(e.reason){case "env-disabled":return "DISABLE_AUTOUPDATER is set";case "env-forced":return "FORCE_AUTOUPDATE_PLUGINS is set";case "flag":return e.enabled?"autoUpdate: true":"autoUpdate: false";case "default":return "default (no explicit flag)"}}function Bs(e=process.env){let a=Uo();if(!we__default.existsSync(a))return [];try{let o=JSON.parse(we__default.readFileSync(a,"utf-8"));return Object.entries(o).map(([t,r])=>PD(t,r,e))}catch{return []}}function wg(){let e=Uo(),a={fixed:[],skipped:[]};if(!we__default.existsSync(e))return a;let o;try{o=JSON.parse(we__default.readFileSync(e,"utf-8"));}catch{return a.skipped.push({name:"(all)",reason:"known_marketplaces.json is malformed JSON"}),a}let t=false;for(let r of kD){let i=o[r];if(!i){a.skipped.push({name:r,reason:"not registered on this machine"});continue}if("autoUpdate"in i){a.skipped.push({name:r,reason:i.autoUpdate?"already autoUpdate: true":"explicitly set to autoUpdate: false \u2014 not overridden"});continue}i.autoUpdate=true,a.fixed.push(r),t=true;}if(t){let r=`${e}.${randomUUID()}.tmp`;we__default.writeFileSync(r,JSON.stringify(o,null,2),{encoding:"utf-8",mode:384}),we__default.renameSync(r,e);}return a}async function DD(e){let a=ne(),o;try{o=await eo(e.source);}catch(r){if(e.source)throw r;o=[];}let t=new Set(a.map(r=>r.name));return S(w.CLI_CATALOG_VIEWED,{interface:Z().interfaceType,filter_type:"available",result_count:o.length}).catch(()=>{}),e.json?(go(o.map(r=>({...r,installed:t.has(r.name)}))),0):(kt(["","Name","Version","Category","Status"],o.map(r=>[t.has(r.name)?"*":" ",r.name??"",r.version??"n/a",r.category??"",t.has(r.name)?"installed":"available"])),0)}async function wD(e){let a=ne(),o=await eo(e.source),t=new Map(o.map(i=>[i.name,i])),r=a.map(i=>{let s=t.get(i.name);return s&&i.version&&s.version&&Ue(i.version,s.version)?{...i,availableVersion:s.version}:null}).filter(i=>i!==null);return S(w.CLI_CATALOG_VIEWED,{interface:Z().interfaceType,filter_type:"outdated",result_count:r.length}).catch(()=>{}),e.json?(go(r),0):r.length===0?(D("All plugins are up to date."),0):(kt(["Name","Installed","Available"],r.map(i=>[i.name??"",i.version??"n/a",i.availableVersion??"n/a"])),process.stdout.write(`
|
|
206
206
|
${r.length} plugin(s) outdated.
|
|
207
207
|
`),0)}async function SD(e){let a=ne();if(S(w.CLI_CATALOG_VIEWED,{interface:Z().interfaceType,filter_type:"all",result_count:a.length}).catch(()=>{}),a.length===0)return D("No plugins installed. Use `flow plugin install <name>` to install one."),0;if(e.json)return go(a),0;let o=[];try{o=await eo(e.source);}catch{o=[];}let t=new Map(o.map(s=>[s.name,s])),r=new Map(Bs().map(s=>[s.name,s.enabled])),i=[...a].sort((s,n)=>{let d=Qr.indexOf(s.scope??"user"),l=Qr.indexOf(n.scope??"user");return (d===-1?1/0:d)-(l===-1?1/0:l)});return kt(["Name","Version","Type","Origin","Scope","Status","Auto-Update","Installed at"],i.map(s=>{let n=t.get(s.name),d=n?.type??"bundle",l=n?.origin??Fd(s.marketplace),c=s.marketplace?r.get(s.marketplace):void 0,u=c===void 0?"n/a":c?"on":"off";return [s.name??"",s.version??"n/a",pt[d]?.label??"Plugin",l,s.scope??"user",s.status??"enabled",u,Ea(s.installedAt??"")]})),process.stdout.write(`
|
|
208
208
|
${a.length} plugin(s) installed.
|
|
@@ -84792,10 +84792,10 @@ flow plugin install runbook-tech-common
|
|
|
84792
84792
|
`);}process.stdout.write(`
|
|
84793
84793
|
`);let{new:p,unchanged:h,clean:f,divergent:g,declined:v}=i.counts;if(K(`${p} new, ${h} unchanged, ${f} updated, ${g} kept (customized)`+(v>0?`, ${v} pending confirmation`:"")),g>0&&D("Some files were kept as-is because they differ from what this command last wrote. Re-run with --force to overwrite them."),v>0&&D("Some updates were declined or skipped (no TTY). Re-run with --force to apply them."),s){process.stdout.write(`
|
|
84794
84794
|
`+R.bold(` docs/catalog + docs/playbooks:
|
|
84795
|
-
`)),s.skippedPlaybooks&&D('No bundles installed (run "flow setup harness" first) \u2014 docs/playbooks/ was skipped; docs/catalog/ was still scaffolded.');let k=s.counts;K(`${k.new} new, ${k.unchanged} unchanged, ${k.clean} updated, ${k.divergent} kept (customized)`+(k.declined>0?`, ${k.declined} pending confirmation`:"")),(k.divergent>0||k.declined>0)&&D("Some docs-content files were kept as-is or pending confirmation. Re-run with --force to resolve.");}return u!==0&&C("flow setup strategy finished with unresolved files \u2014 see above."),u}j();U();var rr=["runbook-common","runbook-design","runbook-ops","runbook-product","runbook-quality","runbook-security","runbook-tech"];var Cc="repos.yaml",TS="projects",MS="projects-ref";function If(e){return Array.isArray(e)
|
|
84795
|
+
`)),s.skippedPlaybooks&&D('No bundles installed (run "flow setup harness" first) \u2014 docs/playbooks/ was skipped; docs/catalog/ was still scaffolded.');let k=s.counts;K(`${k.new} new, ${k.unchanged} unchanged, ${k.clean} updated, ${k.divergent} kept (customized)`+(k.declined>0?`, ${k.declined} pending confirmation`:"")),(k.divergent>0||k.declined>0)&&D("Some docs-content files were kept as-is or pending confirmation. Re-run with --force to resolve.");}return u!==0&&C("flow setup strategy finished with unresolved files \u2014 see above."),u}j();U();var rr=["runbook-common","runbook-design","runbook-ops","runbook-product","runbook-quality","runbook-security","runbook-tech"];var Cc="repos.yaml",TS="projects",MS="projects-ref";function If(e,a,o){if(e===void 0)return [];if(!Array.isArray(e))return o.push(`"${a}:" must be a list \u2014 ignoring the whole section.`),[];let t=[];return e.forEach((r,i)=>{if(typeof r!="object"||r===null){o.push(`${a}[${i}] is not a mapping \u2014 skipped.`);return}let s=r,n=s.name!==void 0?String(s.name):"",d=s.remote!==void 0?String(s.remote):"";if(!n||!d){let l=n||`${a}[${i}]`,c=[!n&&"name",!d&&"remote"].filter(Boolean).join(" and ");o.push(`${l}: missing required field "${c}" \u2014 skipped (did you mean "remote:" instead of "url:"?)`);return}t.push({name:n,remote:d,group:s.group!==void 0?String(s.group):void 0});}),t}function Lf(e){let a=join(e,Cc);if(!existsSync(a))return null;let o=parse(readFileSync(a,"utf8"));if(!o||typeof o!="object"||Array.isArray(o))return null;let t=[],r=o.workspace;r!==void 0&&(typeof r!="object"||r===null)&&t.push('"workspace:" must be a mapping \u2014 using defaults (repos_dir, refs_dir).');let i=r&&typeof r=="object"?r:{};return (o.repos_dir!==void 0||o.refs_dir!==void 0)&&t.push('"repos_dir"/"refs_dir" must be nested under "workspace:", not at the top level \u2014 using defaults.'),{workspace:{repos_dir:String(i.repos_dir??TS),refs_dir:String(i.refs_dir??MS)},repos:If(o.repos,"repos",t),references:If(o.references,"references",t),warnings:t}}function Ff(e,a){let o=join(e,Cc),{warnings:t,...r}=a;writeFileSync(o,stringify(r),"utf8");}function Of(e){let a=join(e,".gitignore"),o=Cc;if(!existsSync(a)){writeFileSync(a,`${o}
|
|
84796
84796
|
`,"utf8");return}readFileSync(a,"utf8").split(`
|
|
84797
84797
|
`).some(i=>i.trim()===o)||appendFileSync(a,`${o}
|
|
84798
|
-
`,"utf8");}var Nf="projects",Gf="projects-ref";function qS(e){let a=e.match(/^https?:\/\/github\.com\/([^/]+)\/([^/.]+)(\.git)?\/?$/);return a?`git@github.com:${a[1]}/${a[2]}.git`:e}async function LS(){let e=await To(" Repo name (ENTER to finish): ");if(!e)return null;let a=await To(` Group/category for '${e}' (optional, default: general): `),o=await To(` Remote (URL) for '${e}' \u2014 SSH or HTTPS: `);if(!o)return null;let t=qS(o),r=await de(` Is '${e}' a reference/read-only repo? [y/N] `);return {entry:{name:e,remote:t,group:a||"general"},isReference:r}}async function Bf(){if(!await de("repos.yaml not found. Set up this repo as a multi-repo workspace? [y/N] "))return null;let a=await To(` Folder for work repos (default: ${Nf}): `),o=await To(` Folder for reference repos (default: ${Gf}): `),t=[],r=[];for(;;){let i=await LS();if(!i)break;i.isReference?r.push(i.entry):t.push(i.entry);}return t.length===0&&r.length===0?null:{workspace:{repos_dir:a||Nf,refs_dir:o||Gf},repos:t,references:r}}I();var Uf=P("workspace:repos"),Wf=6e4;async function NS(e){try{return (await simpleGit(e).status()).current}catch{return null}}function Jf(){let{HOME:e,PATH:a,USER:o,SSH_AUTH_SOCK:t}=process.env;return {HOME:e,PATH:a,USER:o,SSH_AUTH_SOCK:t,GIT_TERMINAL_PROMPT:"0"}}async function GS(e){await simpleGit(e,{timeout:{block:Wf}}).env(Jf()).pull(["--ff-only"]);}async function BS(e,a){await simpleGit({timeout:{block:Wf}}).env(Jf()).clone(e,a);}async function Ac(e,a,o){let t=join(a,e.name),r=join(t,".git");if(existsSync(r)){let i=await NS(t);if(i==="main"||i==="master")try{return await GS(t),{name:e.name,kind:o,outcome:"updated"}}catch(s){return Uf.warn(`[${e.name}] pull failed (branch diverged?): ${String(s)}`),{name:e.name,kind:o,outcome:"skipped"}}return {name:e.name,kind:o,outcome:"skipped"}}try{return mkdirSync(a,{recursive:!0}),await BS(e.remote,t),{name:e.name,kind:o,outcome:"cloned"}}catch(i){let s=i instanceof Error?i.message:String(i);return Uf.error(`[${e.name}] clone failed: ${s}`),{name:e.name,kind:o,outcome:"failed",error:s}}}function an(e,a){return existsSync(e)?readdirSync(e,{withFileTypes:true}).filter(o=>o.isDirectory()&&!a.has(o.name)).map(o=>o.name):[]}async function Hf(e={}){let a=e.targetDir??process.cwd(),o=e.isInteractive??!!process.stdin.isTTY,t=Lf(a);if(!t){if(!o)return {repos:[],orphans:[],prunedCount:0,skippedNoManifest:true};let u=await Bf();if(!u)return {repos:[],orphans:[],prunedCount:0,skippedNoManifest:true};Ff(a,u),Of(a),t=u;}let r=join(a,t.workspace.repos_dir),i=join(a,t.workspace.refs_dir),s=[];for(let u of t.repos)s.push(await Ac(u,r,"repo"));for(let u of t.references)s.push(await Ac(u,i,"reference"));let n=new Set(t.repos.map(u=>u.name)),d=new Set(t.references.map(u=>u.name)),l=[...an(r,n),...an(i,d)],c=0;if(e.prune&&l.length>0)for(let u of [r,i]){let m=an(u,u===r?n:d);for(let p of m)rmSync(join(u,p),{recursive:true,force:true}),c++;}return {repos:s,orphans:e.prune?[]:l,prunedCount:c,skippedNoManifest:false}}var WS=promisify(execFile),Qf=5e3;async function Vf(){try{let{stdout:e,stderr:a}=await WS("ssh",["-T","git@github.com","-o","BatchMode=yes","-o",`ConnectTimeout=${Qf/1e3}`],{timeout:Qf+2e3});return `${e}${a}`.includes("successfully authenticated")}catch(e){return `${e.stdout??""}${e.stderr??""}`.includes("successfully authenticated")}}I();var JS=["local","project","user"];function HS(){D(`The following ${rr.length} runbook bundles will be installed:`);for(let e of rr)process.stdout.write(` - ${e}
|
|
84798
|
+
`,"utf8");}var Nf="projects",Gf="projects-ref";function qS(e){let a=e.match(/^https?:\/\/github\.com\/([^/]+)\/([^/.]+)(\.git)?\/?$/);return a?`git@github.com:${a[1]}/${a[2]}.git`:e}async function LS(){let e=await To(" Repo name (ENTER to finish): ");if(!e)return null;let a=await To(` Group/category for '${e}' (optional, default: general): `),o=await To(` Remote (URL) for '${e}' \u2014 SSH or HTTPS: `);if(!o)return null;let t=qS(o),r=await de(` Is '${e}' a reference/read-only repo? [y/N] `);return {entry:{name:e,remote:t,group:a||"general"},isReference:r}}async function Bf(){if(!await de("repos.yaml not found. Set up this repo as a multi-repo workspace? [y/N] "))return null;let a=await To(` Folder for work repos (default: ${Nf}): `),o=await To(` Folder for reference repos (default: ${Gf}): `),t=[],r=[];for(;;){let i=await LS();if(!i)break;i.isReference?r.push(i.entry):t.push(i.entry);}return t.length===0&&r.length===0?null:{workspace:{repos_dir:a||Nf,refs_dir:o||Gf},repos:t,references:r,warnings:[]}}I();var Uf=P("workspace:repos"),Wf=6e4;async function NS(e){try{return (await simpleGit(e).status()).current}catch{return null}}function Jf(){let{HOME:e,PATH:a,USER:o,SSH_AUTH_SOCK:t}=process.env;return {HOME:e,PATH:a,USER:o,SSH_AUTH_SOCK:t,GIT_TERMINAL_PROMPT:"0"}}async function GS(e){await simpleGit(e,{timeout:{block:Wf}}).env(Jf()).pull(["--ff-only"]);}async function BS(e,a){await simpleGit({timeout:{block:Wf}}).env(Jf()).clone(e,a);}async function Ac(e,a,o){let t=join(a,e.name),r=join(t,".git");if(existsSync(r)){let i=await NS(t);if(i==="main"||i==="master")try{return await GS(t),{name:e.name,kind:o,outcome:"updated"}}catch(s){return Uf.warn(`[${e.name}] pull failed (branch diverged?): ${String(s)}`),{name:e.name,kind:o,outcome:"skipped"}}return {name:e.name,kind:o,outcome:"skipped"}}try{return mkdirSync(a,{recursive:!0}),await BS(e.remote,t),{name:e.name,kind:o,outcome:"cloned"}}catch(i){let s=i instanceof Error?i.message:String(i);return Uf.error(`[${e.name}] clone failed: ${s}`),{name:e.name,kind:o,outcome:"failed",error:s}}}function an(e,a){return existsSync(e)?readdirSync(e,{withFileTypes:true}).filter(o=>o.isDirectory()&&!a.has(o.name)).map(o=>o.name):[]}async function Hf(e={}){let a=e.targetDir??process.cwd(),o=e.isInteractive??!!process.stdin.isTTY,t=Lf(a);if(!t){if(!o)return {repos:[],orphans:[],prunedCount:0,skippedNoManifest:true,manifestWarnings:[]};let u=await Bf();if(!u)return {repos:[],orphans:[],prunedCount:0,skippedNoManifest:true,manifestWarnings:[]};Ff(a,u),Of(a),t=u;}let r=join(a,t.workspace.repos_dir),i=join(a,t.workspace.refs_dir),s=[];for(let u of t.repos)s.push(await Ac(u,r,"repo"));for(let u of t.references)s.push(await Ac(u,i,"reference"));let n=new Set(t.repos.map(u=>u.name)),d=new Set(t.references.map(u=>u.name)),l=[...an(r,n),...an(i,d)],c=0;if(e.prune&&l.length>0)for(let u of [r,i]){let m=an(u,u===r?n:d);for(let p of m)rmSync(join(u,p),{recursive:true,force:true}),c++;}return {repos:s,orphans:e.prune?[]:l,prunedCount:c,skippedNoManifest:false,manifestWarnings:t.warnings}}var WS=promisify(execFile),Qf=5e3;async function Vf(){try{let{stdout:e,stderr:a}=await WS("ssh",["-T","git@github.com","-o","BatchMode=yes","-o",`ConnectTimeout=${Qf/1e3}`],{timeout:Qf+2e3});return `${e}${a}`.includes("successfully authenticated")}catch(e){return `${e.stdout??""}${e.stderr??""}`.includes("successfully authenticated")}}I();var JS=["local","project","user"];function HS(){D(`The following ${rr.length} runbook bundles will be installed:`);for(let e of rr)process.stdout.write(` - ${e}
|
|
84799
84799
|
`);}function QS(e){let a=Ce().plugins,o=process.cwd();for(let[t,r]of Object.entries(a))if(t===e||t.startsWith(`${e}@`)){let i=r.find(s=>s.scope==="user"||s.projectPath===o);if(i)return i}}function on(e){return e.scope==="user"?"globally (~/.claude/)":`at ${e.scope} scope in ${e.projectPath??"(unknown project)"}`}async function VS(e,a,o){return D(`${e} is already installed ${on(o)}.`),de(` Move it to ${Va[a].actionLabel} instead? This uninstalls it from ${on(o)} first. [y/N] `)}async function _S(){return ts(" Install scope:",JS.map(e=>({value:e,label:Va[e].actionLabel,description:Va[e].description})))}async function _f(e={}){let a=e.isInteractive??!!process.stdin.isTTY;e.silent||HS();let o=e.scope;if(!o&&!e.silent&&a)try{o=await _S();}catch(r){if(r instanceof Error&&r.message==="SIGINT")return process.stdout.write(`
|
|
84800
84800
|
`),130;throw r}let t=[];for(let r=0;r<rr.length;r++){let i=rr[r],s=`[${r+1}/${rr.length}] `,n=e.force??false;if(!n){let d=QS(i);if(d){if(e.silent||!a){e.silent||D(`${s}Skipping ${i} \u2014 already installed ${on(d)}. Re-run with --force to install here too.`);continue}try{if(!await VS(i,o,d)){D(`${s}Skipped ${i}.`);continue}let c=await Us(i,{force:!0,scope:d.scope});if(c!==0){D(`${s}Could not remove ${i} from ${on(d)} \u2014 skipping rather than leaving it in an inconsistent state.`),t.push(c);continue}}catch(l){if(l instanceof Error&&l.message==="SIGINT")return process.stdout.write(`
|
|
84801
84801
|
`),130;throw l}}}e.silent||D(`${s}Installing ${i}...`),t.push(await or([i],{scope:o,silent:e.silent,force:n}));}return t.some(r=>r!==0)?1:0}var XS=P("cli:setup-workspace");function KS(e){switch(e){case "cloned":return "cloned";case "updated":return "updated";case "skipped":return "skipped (diverged or another branch)";case "failed":return "failed"}}async function $S(e){e||await Vf()||(D("SSH key not configured for GitHub (or not added to your account)."),process.stdout.write(` This may cause repo clones below to fail. To set one up:
|
|
@@ -84806,7 +84806,7 @@ flow plugin install runbook-tech-common
|
|
|
84806
84806
|
`),process.stdout.write(` 5. Copy the public key: pbcopy < ~/.ssh/id_ed25519.pub (macOS)
|
|
84807
84807
|
`),process.stdout.write(` 6. Add it on GitHub: https://github.com/settings/ssh/new
|
|
84808
84808
|
`),process.stdout.write(` 7. Test the connection: ssh -T git@github.com
|
|
84809
|
-
`));}async function Xf(e={}){XS.debug(`Running flow setup workspace: ${JSON.stringify(e)}`),await $S(e.json);let a=await Hf({targetDir:e.path,prune:e.prune});if(e.json)return ye({repos:a.repos,orphans:a.orphans,prunedCount:a.prunedCount,skippedNoManifest:a.skippedNoManifest}),a.repos.some(s=>s.outcome==="failed")?1:0;if(a.skippedNoManifest)return D("No repos.yaml and no interactive terminal \u2014 nothing to do."),0;for(let s of a.repos)process.stdout.write(` ${s.name}: ${KS(s.outcome)}
|
|
84809
|
+
`));}async function Xf(e={}){XS.debug(`Running flow setup workspace: ${JSON.stringify(e)}`),await $S(e.json);let a=await Hf({targetDir:e.path,prune:e.prune});if(e.json)return ye({repos:a.repos,orphans:a.orphans,prunedCount:a.prunedCount,skippedNoManifest:a.skippedNoManifest,manifestWarnings:a.manifestWarnings}),a.repos.some(s=>s.outcome==="failed")?1:0;for(let s of a.manifestWarnings)D(`repos.yaml: ${s}`);if(a.skippedNoManifest)return D("No repos.yaml and no interactive terminal \u2014 nothing to do."),0;for(let s of a.repos)process.stdout.write(` ${s.name}: ${KS(s.outcome)}
|
|
84810
84810
|
`);let o=a.repos.filter(s=>s.outcome==="cloned").length,t=a.repos.filter(s=>s.outcome==="updated").length,r=a.repos.filter(s=>s.outcome==="skipped").length,i=a.repos.filter(s=>s.outcome==="failed").length;return K(`${o} cloned, ${t} updated, ${r} skipped`+(i>0?`, ${i} failed`:"")+(a.prunedCount>0?`, ${a.prunedCount} pruned`:"")),a.orphans.length>0&&D(`Orphan director${a.orphans.length===1?"y":"ies"} not in repos.yaml: ${a.orphans.join(", ")}. Re-run with --prune to remove.`),i>0?1:0}function Kf(e){let a=new Command;a.enablePositionalOptions(),a.name("flow").description("FlowSetup CLI \u2014 Manage Flow plugins in your Claude Code").version(`@ciandt-flow/cli v${te}`,"-V, --version","Display the CLI version").addHelpText("after",`
|
|
84811
84811
|
Without arguments, opens the interactive interface (TUI).
|
|
84812
84812
|
Use 'flow <command> --help' for details on each command.`).action(async()=>{await e();});let o=new Command("setup").description("Configure the CLI and provision Flow structure in the current repository");o.command("init").description("Initialize the Flow CLI configuration").addHelpText("after",`
|