diff --git a/shell-setup/bundled.esm.js b/shell-setup/bundled.esm.js index 76bf43c..821d3a1 100644 --- a/shell-setup/bundled.esm.js +++ b/shell-setup/bundled.esm.js @@ -24,4 +24,7 @@ end `)||(i=oe(i,` `)))}catch{n=n&&ie(n,` `),i=i&&oe(i,` -`)}if(!n&&!i)return!1;s!==void 0&&await r.add(e,s),await _(y(e));try{return await ve(e,n+(s??"")+i,{create:!0}),!0}catch(a){if(a instanceof Deno.errors.PermissionDenied||a instanceof Deno.errors.NotCapable)return!1;throw G(`Failed to update shell rc file: ${e}`,a)}}async function yt(e,t,r){for(let n of e){let i=await(n.sourceString??De)(t);for(let s of await n.rcsToUpdate())await $e(s,i,r)}}var Et=[new M,new j,new K,new Z];async function _t(){let e=[];for(let t of Et)await t.exists()&&e.push(t);return e}async function Tt(e,t){let r=await _t();await St(r,e);let n=new se(t);await Se("Edit shell configs to add deno to the PATH?",{default:!0})&&(await _(t),await yt(r,e,n));let i=r.filter(o=>o.supportsCompletion!==!1),a=(await Pe({message:"Set up completions?",options:i.map(o=>{let f=typeof o.supportsCompletion=="string"?` (${o.supportsCompletion})`:"";return o.name+f})})).map(o=>i[o]);if(a.length>0){await _(t);let o=await Rt(a);await Pt(a.filter((f,l)=>o[l]!=="fail"),n)}}async function Dt(){if(Deno.build.os==="windows"||!Deno.stdin.isTerminal())return;if(Deno.args.length===0)throw new Error("Expected the deno install directory as the first argument");let e=Deno.args[0].trim(),t=d(e,".shellRcBackups");await Tt(e,t)}import.meta.main&&await Dt(); +`)}if(!n&&!i)return!1;s!==void 0&&await r.add(e,s),await _(y(e));try{return await ve(e,n+(s??"")+i,{create:!0}),!0}catch(a){if(a instanceof Deno.errors.PermissionDenied||a instanceof Deno.errors.NotCapable)return!1;throw G(`Failed to update shell rc file: ${e}`,a)}}async function yt(e,t,r){for(let n of e){let i=await(n.sourceString??De)(t);for(let s of await n.rcsToUpdate())await $e(s,i,r)}}var Et=[new M,new j,new K,new Z];async function _t(){let e=[];for(let t of Et)await t.exists()&&e.push(t);return e}async function Tt(e,t){let r=await _t();await St(r,e);let n=new se(t);await Se("Edit shell configs to add deno to the PATH?",{default:!0})&&(await _(t),await yt(r,e,n),console.log(` +Deno was added to the PATH. +You may need to restart your shell for it to become available. +`));let i=r.filter(o=>o.supportsCompletion!==!1),a=(await Pe({message:"Set up completions?",options:i.map(o=>{let f=typeof o.supportsCompletion=="string"?` (${o.supportsCompletion})`:"";return o.name+f})})).map(o=>i[o]);if(a.length>0){await _(t);let o=await Rt(a);await Pt(a.filter((f,l)=>o[l]!=="fail"),n)}}async function Dt(){if(Deno.build.os==="windows"||!Deno.stdin.isTerminal())return;if(Deno.args.length===0)throw new Error("Expected the deno install directory as the first argument");let e=Deno.args[0].trim(),t=d(e,".shellRcBackups");await Tt(e,t)}import.meta.main&&await Dt();