MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / Ne4

Function Ne4

package/cli.js:2132–2132  ·  view source on GitHub ↗
(q,K,_)

Source from the content-addressed store, hash-verified

2130 1. Install Node.js within your Linux distribution: e.g. sudo apt install nodejs npm
2131 2. Make sure Linux NPM is in your PATH before the Windows version
2132 3. Try updating again with 'claude update'
2133`),"install_failed";let{hasPermissions:K}=await il1();if(!K)return"no_permissions";let _=q?`${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL}@${q}`:{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL,z=a1.isRunningWithBun()?"bun":"npm",Y=await S7(z,["install","-g",_],{cwd:St6()});if(Y.code!==0){let $=new TS8(`Failed to install new version of claude: ${Y.stdout} ${Y.stderr}`);return H6($),"install_failed"}return b8(($)=>({...$,installMethod:"global"})),"success"}finally{await AIz()}}async function wIz(){let q=x46();for(let[,K]of Object.entries(q))try{let _=await ht6(K);if(!_)continue;let{filtered:z,hadAlias:Y}=fS8(_);if(Y)await ZS8(K,z),N(`Removed claude alias from ${K}`)}catch(_){N(`Failed to remove alias from ${K}: ${_}`,{level:"error"})}}var YIz="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases",TS8,Oe4=300000;var Lo=y(()=>{CK();o1();k8();V1();_8();y_();m8();y8();XK();e7();RA();E8();U1();GS8();l8();TS8=class TS8 extends lx6{}});import{readFile as jIz}from"fs/promises";function VS8(q,K){return K.includes(q.id)||q.idLike.some((_)=>K.includes(_))}function rl1(){let q=process.execPath||process.argv[0]||"";if(/[/\\]mise[/\\]installs[/\\]/i.test(q))return N(`Detected mise installation: ${q}`),!0;return!1}function ol1(){let q=process.execPath||process.argv[0]||"";if(/[/\\]\.?asdf[/\\]installs[/\\]/i.test(q))return N(`Detected asdf installation: ${q}`),!0;return!1}function NS8(){let q=Z1();if(q!=="macos"&&q!=="linux"&&q!=="wsl")return!1;let K=process.execPath||process.argv[0]||"";if(K.includes("/Caskroom/"))return N(`Detected Homebrew cask installation: ${K}`),!0;return!1}function al1(){if(Z1()!=="windows")return!1;let K=process.execPath||process.argv[0]||"",_=[/Microsoft[/\\]WinGet[/\\]Packages/i,/Microsoft[/\\]WinGet[/\\]Links/i];for(let z of _)if(z.test(K))return N(`Detected winget installation: ${K}`),!0;return!1}var kS8,sl1,tl1,el1,qn1,ny6;var yS8=y(()=>{F4();_8();XK();vK();kS8=_1(async()=>{try{let q=await jIz("/etc/os-release","utf8"),K=q.match(/^ID=["']?(\S+?)["']?\s*$/m),_=q.match(/^ID_LIKE=["']?(.+?)["']?\s*$/m);return{id:K?.[1]??"",idLike:_?.[1]?.split(" ")??[]}}catch{return null}});sl1=_1(async()=>{if(Z1()!=="linux")return!1;let K=await kS8();if(K&&!VS8(K,["arch"]))return!1;let _=process.execPath||process.argv[0]||"",z=await a8("pacman",["-Qo",_],{timeout:5000,useCwd:!1});if(z.code===0&&z.stdout)return N(`Detected pacman installation: ${z.stdout.trim()}`),!0;return!1}),tl1=_1(async()=>{if(Z1()!=="linux")return!1;let K=await kS8();if(K&&!VS8(K,["debian"]))return!1;let _=process.execPath||process.argv[0]||"",z=await a8("dpkg",["-S",_],{timeout:5000,useCwd:!1});if(z.code===0&&z.stdout)return N(`Detected deb installation: ${z.stdout.trim()}`),!0;return!1}),el1=_1(async()=>{if(Z1()!=="linux")return!1;let K=await kS8();if(K&&!VS8(K,["fedora","rhel","suse"]))return!1;let _=process.execPath||process.argv[0]||"",z=await a8("rpm",["-qf",_],{timeout:5000,useCwd:!1});if(z.code===0&&z.stdout)return N(`Detected rpm installation: ${z.stdout.trim()}`),!0;return!1}),qn1=_1(async()=>{if(Z1()!=="linux")return!1;let K=await kS8();if(K&&!VS8(K,["alpine"]))return!1;let _=process.execPath||process.argv[0]||"",z=await a8("apk",["info","--who-owns",_],{timeout:5000,useCwd:!1});if(z.code===0&&z.stdout)return N(`Detected apk installation: ${z.stdout.trim()}`),!0;return!1}),ny6=_1(async()=>{if(NS8())return"homebrew";if(al1())return"winget";if(rl1())return"mise";if(ol1())return"asdf";if(await sl1())return"pacman";if(await qn1())return"apk";if(await tl1())return"deb";if(await el1())return"rpm";return"unknown"})});import{readFile as HIz,realpath as Pe4}from"fs/promises";import{homedir as R26}from"os";import{delimiter as JIz,join as Rm,posix as bt6,win32 as xt6}from"path";function MIz(){let q=process.argv[1]||"",K=process.execPath||process.argv[0]||"";if(Z1()==="windows")q=q.split(xt6.sep).join(bt6.sep),K=K.split(xt6.sep).join(bt6.sep);return[q,K]}async function Ro(){let[q]=MIz();if(jj()){if(NS8()||al1()||rl1()||ol1()||await sl1()||await tl1()||await el1()||await qn1())return"package-manager";return"native"}if(_e4())return"npm-local";if(["/usr/local/lib/node_modules","/usr/lib/node_modules","/opt/homebrew/lib/node_modules","/opt/homebrew/bin","/usr/local/bin","/.nvm/versions/node/"].some((Y)=>q.includes(Y)))return"npm-global";if(q.includes("/npm/")||q.includes("/nvm/"))return"npm-global";let _=await m_("npm config get prefix",{shell:!0,reject:!1}),z=_.exitCode===0?_.stdout.trim():null;if(z&&q.startsWith(z))return"npm-global";return"unknown"}async function XIz(){if(jj()){try{return await Pe4(process.execPath)}catch{}try{let q=await TO("claude");if(q)return q}catch{}try{return await X8().stat(Rm(R26(),".local/bin/claude")),Rm(R26(),".local/bin/claude")}catch{}return"native"}try{return process.argv[0]||"unknown"}catch{return"unknown"}}function PIz(){try{if(jj())return process.execPath||"unknown";return process.argv[1]||"unknown"}catch{return"unknown"}}async function WIz(){let q=X8(),K=[],_=Rm(R26(),".claude","local");if(await y26())K.push({type:"npm-local",path:_});let z=["@anthropic-ai/claude-code"];if({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL&&{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL!=="@anthropic-ai/claude-code")z.push({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL);let Y=await a8("npm",["-g","config","get","prefix"]);if(Y.code===0&&Y.stdout){let O=Y.stdout.trim(),w=Z1()==="windows",j=w?Rm(O,"claude"):Rm(O,"bin","claude"),H=!1;try{await q.stat(j),H=!0}catch{}if(H){let J=!1;try{if((await Pe4(j)).includes("/Caskroom/"))J=NS8()}catch{}if(!J)K.push({type:"npm-global",path:j})}else for(let J of z){let M=w?Rm(O,"node_modules",J):Rm(O,"lib","node_modules",J);try{await q.stat(M),K.push({type:"npm-global-orphan",path:M})}catch{}}}let $=Rm(R26(),".local","bin","claude");try{await q.stat($),K.push({type:"native",path:$})}catch{}if(j8().installMethod==="native"){let O=Rm(R26(),".local","share","claude");try{if(await q.stat(O),!K.some((w)=>w.type==="native"))K.push({type:"native",path:O})}catch{}}return K}async function DIz(q){let K=[];try{let $=await HIz(Rm(MP(),"managed-settings.json"),"utf-8"),A=r8($),O=A&&typeof A==="object"?A.strictPluginOnlyCustomization:void 0;if(O!==void 0&&typeof O!=="boolean")if(!Array.isArray(O))K.push({issue:`managed-settings.json: strictPluginOnlyCustomization has an invalid value (expected true or an array, got ${typeof O})`,fix:`The field is silently ignored (schema .catch rescues it). Set it to true, or an array of: ${HD6.join(", ")}.`});else{let w=O.filter((j)=>typeof j==="string"&&!HD6.includes(j));if(w.length>0)K.push({issue:`managed-settings.json: strictPluginOnlyCustomization has ${w.length} value(s) this client doesn't recognize: ${w.map(String).join(", ")}`,fix:`These are silently ignored (forwards-compat). Known surfaces for this version: ${HD6.join(", ")}. Either remove them, or this client is older than the managed-settings intended.`})}}catch{}let _=j8();if(q==="development")return K;if(q==="native"){let A=(process.env.PATH||"").split(JIz),O=R26(),w=Rm(O,".local","bin"),j=w;if(Z1()==="windows")j=w.split(xt6.sep).join(bt6.sep);if(!A.some((J)=>{let M=J;if(Z1()==="windows")M=J.split(xt6.sep).join(bt6.sep);let X=M.replace(/\/+$/,""),P=J.replace(/[/\\]+$/,"");return X===j||P==="~/.local/bin"||P==="$HOME/.local/bin"}))if(Z1()==="windows"){let M=w.split(bt6.sep).join(xt6.sep);K.push({issue:`Native installation exists but ${M} is not in your PATH`,fix:"Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal."})}else{let M=cy6(),P=x46()[M],W=P?P.replace(R26(),"~"):"your shell config file";K.push({issue:"Native installation exists but ~/.local/bin is not in your PATH",fix:`Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ${W} then open a new terminal or run: source ${W}`})}}if(!i6(process.env.DISABLE_INSTALLATION_CHECKS)){if(q==="npm-local"&&_.installMethod!=="local")K.push({issue:`Running from local installation but config install method is '${_.installMethod}'`,fix:"Consider using native installation: claude install"});if(q==="native"&&_.installMethod!=="native")K.push({issue:`Running native installation but config install method is '${_.installMethod}'`,fix:"Run claude install to update configuration"})}if(q==="npm-global"&&await y26())K.push({issue:"Local installation exists but not being used",fix:"Consider using native installation: claude install"});let z=await nl1(),Y=await $e4();if(q==="npm-local"){if(!await TO("claude")&&!Y)if(z)K.push({issue:"Local installation not accessible",fix:`Alias exists but points to invalid target: ${z}. Update alias: alias claude="~/.claude/local/claude"`});else K.push({issue:"Local installation not accessible",fix:'Create alias: alias claude="~/.claude/local/claude"'})}return K}function fIz(){if(Z1()!=="linux")return[];let q=[],K=M7.getLinuxGlobPatternWarnings();if(K.length>0){let _=K.slice(0,3).join(", "),z=K.length-3,Y=z>0?`${_} (${z} more)`:_;q.push({issue:"Glob patterns in sandbox permission rules are not fully supported on Linux",fix:`Found ${K.length} pattern(s): ${Y}. On Linux, glob patterns in Edit/Read rules will be ignored.`})}return q}async function h26(){let q=await Ro(),K={ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.VERSION?{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.VERSION:"unknown",_=await XIz(),z=PIz(),Y=await WIz(),$=await DIz(q);if($.push(...fIz()),q==="native"){let X=Y.filter((W)=>W.type==="npm-global"||W.type==="npm-global-orphan"||W.type==="npm-local"),P=Z1()==="windows";for(let W of X)if(W.type==="npm-global"){let D="npm -g uninstall @anthropic-ai/claude-code";if({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL&&{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL!=="@anthropic-ai/claude-code")D+=` && npm -g uninstall ${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL}`;$.push({issue:`Leftover npm global installation at ${W.path}`,fix:`Run: ${D}`})}else if(W.type==="npm-global-orphan")$.push({issue:`Orphaned npm global package at ${W.path}`,fix:P?`Run: rmdir /s /q "${W.path}"`:`Run: rm -rf ${W.path}`});else if(W.type==="npm-local")$.push({issue:`Leftover npm local installation at ${W.path}`,fix:P?`Run: rmdir /s /q "${W.path}"`:`Run: rm -rf ${W.path}`})}let O=j8().installMethod||"not set",w=null;if(q==="npm-global"){if(w=(await il1()).hasPermissions,!w&&!c$6())$.push({issue:"Insufficient permissions for auto-updates",fix:"Do one of: (1) Re-install node without sudo, or (2) Use `claude install` for native installation"})}let j=zK4(),H={working:j.working??!0,mode:j.mode,systemPath:j.mode==="system"?j.path:null},J=q==="package-manager"?await ny6():void 0;return{installationType:q,version:K,installationPath:_,invokedBinary:z,configInstallMethod:O,autoUpdates:(()=>{let X=c$6();return X?`disabled (${Cc6(X)})`:"enabled"})(),hasUpdatePermissions:w,multipleInstallations:Y,warnings:$,packageManager:J,ripgrepStatus:H}}var u46=y(()=>{Df();Lo();V1();I7();m8();XK();e7();E26();yS8();vK();KC();K$();qI();vh();GS8();l8();rk()});import{homedir as ZIz}from"os";import{join as ES8}from"path";function LS8(q){return{env:q?.env??process.env,home:q?.homedir??process.env.HOME??ZIz()}}function RS8(q){let{env:K,home:_}=LS8(q);return K.XDG_STATE_HOME??ES8(_,".local","state")}function We4(q){let{env:K,home:_}=LS8(q);return K.XDG_CACHE_HOME??ES8(_,".cache")}function hS8(q){let{env:K,home:_}=LS8(q);return K.XDG_DATA_HOME??ES8(_,".local","share")}function SS8(q){let{home:K}=LS8(q);return ES8(K,".local","bin")}var CS8=()=>{};import{createHash as TIz}from"crypto";import{chmod as vIz,writeFile as kIz}from"fs/promises";import{join as VIz}from"path";async function NIz(q="latest",K,_){let z=Date.now();try{let Y=await $1.get(`${K}/${q}`,{timeout:30000,responseType:"text",..._}),$=Date.now()-z;return d("tengu_version_check_success",{latency_ms:$}),Y.data.trim()}catch(Y){let $=Date.now()-z,A=Y instanceof Error?Y.message:String(Y),O;if($1.isAxiosError(Y)&&Y.response)O=Y.response.status;d("tengu_version_check_failure",{latency_ms:$,http_status:O,is_timeout:A.includes("timeout")});let w=Error(`Failed to fetch version from ${K}/${q}: ${A}`);throw H6(w),w}}async function fe4(q){if(/^v?\d+\.\d+\.\d+(-\S+)?$/.test(q)){let _=q.startsWith("v")?q.slice(1):q;if(/^99\.99\./.test(_))throw Error(`Version ${_} is not available for installation. Use 'stable' or 'latest'.`);return _}let K=q;if(K!=="stable"&&K!=="latest")throw Error(`Invalid channel: ${q}. Use 'stable' or 'latest'`);return NIz(K,De4)}function EIz(){return Number(process.env.CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING)||yIz}async function LIz(q,K,_,z={}){let Y;for(let $=1;$<=Kn1;$++){let A=new AbortController,O,w=()=>{if(O)clearTimeout(O),O=void 0},j=()=>{w(),O=setTimeout((H)=>H.abort(),EIz(),A)};try{j();let H=await $1.get(q,{timeout:300000,responseType:"arraybuffer",signal:A.signal,onDownloadProgress:()=>{j()},...z});w();let J=TIz("sha256");J.update(H.data);let M=J.digest("hex");if(M!==K)throw Error(`Checksum mismatch: expected ${K}, got ${M}`);await kIz(_,Buffer.from(H.data)),await vIz(_,493);return}catch(H){w();let J=$1.isCancel(H);if(J)Y=new Ze4;else Y=x1(H);if(J&&$<Kn1){N(`Download stalled on attempt ${$}/${Kn1}, retrying...`),await R7(1000);continue}throw Y}}throw Y??Error("Download failed after all retries")}async function RIz(q,K,_,z){let Y=X8();await Y.rm(K,{recursive:!0,force:!0});let $=ho(),A=Date.now();d("tengu_binary_download_attempt",{});let O;try{O=(await $1.get(`${_}/${q}/manifest.json`,{timeout:1e4,responseType:"json",...z})).data}catch(X){let P=Date.now()-A,W=X instanceof Error?X.message:String(X),D;if($1.isAxiosError(X)&&X.response)D=X.response.status;throw d("tengu_binary_manifest_fetch_failure",{latency_ms:P,http_status:D,is_timeout:W.includes("timeout")}),H6(Error(`Failed to fetch manifest from ${_}/${q}/manifest.json: ${W}`)),X}let w=O.platforms[$];if(!w)throw d("tengu_binary_platform_not_found",{}),Error(`Platform ${$} not found in manifest for version ${q}`);let j=w.checksum,H=bS8($),J=`${_}/${q}/${$}/${H}`;await Y.mkdir(K);let M=VIz(K,H);try{await LIz(J,j,M,z||{});let X=Date.now()-A;d("tengu_binary_download_success",{latency_ms:X})}catch(X){let P=Date.now()-A,W=X instanceof Error?X.message:String(X),D;if($1.isAxiosError(X)&&X.response)D=X.response.status;throw d("tengu_binary_download_failure",{latency_ms:P,http_status:D,is_timeout:W.includes("timeout"),is_checksum_mismatch:W.includes("Checksum mismatch")}),H6(Error(`Failed to download binary from ${J}: ${W}`)),X}}async function Ge4(q,K){return await RIz(q,K,De4),"binary"}var De4="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases",yIz=60000,Kn1=3,Ze4;var Te4=y(()=>{CK();k8();_8();y8();XK();e7();E8();l8();_n1();Ze4=class Ze4 extends Error{constructor(){super("Download stalled: no data received for 60 seconds");this.name="StallTimeoutError"}}});import{basename as hIz,join as ve4}from"path";function m46(){if(i6(void 0))return!0;if(k_(void 0))return!1;return g8("tengu_pid_based_version_locking",!1)}function xS8(q){if(q<=1)return!1;try{return process.kill(q,0),!0}catch{return!1}}function CIz(q,K){if(!xS8(q))return!1;if(q===process.pid)return!0;try{let _=aiq(q);if(!_)return!0;let z=_.toLowerCase(),Y=K.toLowerCase();return z.includes("claude")||z.includes(Y)}catch{return!0}}function S26(q){let K=X8();try{let _=K.readFileSync(q,{encoding:"utf8"});if(!_||_.trim()==="")return null;let z=r8(_);if(typeof z.pid!=="number"||!z.version||!z.execPath)return null;return z}catch{return null}}function It6(q){let K=S26(q);if(!K)return!1;let{pid:_,execPath:z}=K;if(!xS8(_))return!1;if(!CIz(_,z))return N(`Lock PID ${_} is running but does not appear to be Claude - treating as stale`),!1;let Y=X8();try{let $=Y.statSync(q);if(Date.now()-$.mtimeMs>SIz){if(!xS8(_))return!1}}catch{}return!0}function bIz(q,K){let _=X8(),z=`${q}.tmp.${process.pid}.${Date.now()}`;try{$j(z,g6(K,null,2),{encoding:"utf8",flush:!0}),_.renameSync(z,q)}catch(Y){try{_.unlinkSync(z)}catch{}throw Y}}async function ke4(q,K){let _=X8(),z=hIz(q);if(It6(K)){let $=S26(K);return N(`Cannot acquire lock for ${z} - held by PID ${$?.pid}`),null}let Y={pid:process.pid,version:z,execPath:process.execPath,acquiredAt:Date.now()};try{if(bIz(K,Y),S26(K)?.pid!==process.pid)return null;return N(`Acquired PID lock for ${z} (PID ${process.pid})`),()=>{try{if(S26(K)?.pid===process.pid)_.unlinkSync(K),N(`Released PID lock for ${z}`)}catch(A){N(`Failed to release lock for ${z}: ${A}`)}}}catch($){return N(`Failed to acquire lock for ${z}: ${$}`),null}}async function Ve4(q,K){let _=await ke4(q,K);if(!_)return!1;let z=()=>{try{_()}catch{}};return process.on("exit",z),process.on("SIGINT",z),process.on("SIGTERM",z),!0}async function Ne4(q,K,_){let z=await ke4(q,K);if(!z)return!1;try{return await _(),!0}finally{z()}}function ye4(q){let K=X8(),_=[];try{let z=K.readdirStringSync(q).filter((Y)=>Y.endsWith(".lock"));for(let Y of z){let $=ve4(q,Y),A=S26($);if(A)_.push({version:A.version,pid:A.pid,isProcessRunning:xS8(A.pid),execPath:A.execPath,acquiredAt:new Date(A.acquiredAt),lockFilePath:$})}}catch(z){if(_7(z))return _;H6(x1(z))}return _}function IS8(q){let K=X8(),_=0;try{let z=K.readdirStringSync(q).filter((Y)=>Y.endsWith(".lock"));for(let Y of z){let $=ve4(q,Y);try{if(K.lstatSync($).isDirectory())K.rmSync($,{recursive:!0,force:!0}),_++,N(`Cleaned up legacy directory lock: ${Y}`);else if(!It6($))K.unlinkSync($),_++,N(`Cleaned up stale lock: ${Y}`)}catch{}}}catch(z){if(_7(z))return 0;H6(x1(z))}return _}var SIz=7200000;var zn1=y(()=>{o1();_8();m8();y8();e7();u$6();E8();l8()});import{constants as xIz}from"fs";import{access as he4,chmod as IIz,copyFile as $n1,lstat as uIz,mkdir as b26,readdir as mS8,readlink as An1,realpath as mIz,rename as pS8,rm as gS8,rmdir as pIz,stat as hm,symlink as BIz,unlink as MQ,writeFile as gIz}from"fs/promises";import{homedir as Se4}from"os";import{basename as FIz,delimiter as UIz,dirname as So,join as xX,resolve as Co}from"path";function ho(){let q=a1.platform,K=process.arch==="x64"?"x64":process.arch==="arm64"?"arm64":null;if(!K){let _=Error(`Unsupported architecture: ${process.arch}`);throw N(`Native installer does not support architecture: ${process.arch}`,{level:"error"}),_}if(q==="linux"&&BV.isMuslEnvironment())return`linux-${K}-musl`;return`${q}-${K}`}function bS8(q){return q.startsWith("win32")?"claude.exe":"claude"}function XQ(){let q=ho(),K=bS8(q);return{versions:xX(hS8(),"claude","versions"),staging:xX(We4(),"claude","staging"),locks:xX(RS8(),"claude","locks"),executable:xX(SS8(),K)}}async function C26(q){try{let K=await hm(q);if(!K.isFile()||K.size===0)return!1;return await he4(q,xIz.X_OK),!0}catch{return!1}}async function wn1(q){let K=XQ(),_=[K.versions,K.staging,K.locks];await Promise.all(_.map(($)=>b26($,{recursive:!0})));let z=So(K.executable);await b26(z,{recursive:!0});let Y=xX(K.versions,q);try{await hm(Y)}catch{await gIz(Y,"",{encoding:"utf8"})}return{stagingPath:xX(K.staging,q),installPath:Y}}async function Ce4(q,K,_=0){let z=XQ(),Y=ut6(z,q);if(await b26(z.locks,{recursive:!0}),m46()){let A=0,O=_+1,w=_>0?1000:100,j=_>0?5000:500;while(A<O){if(await Ne4(q,Y,async()=>{try{await K()}catch(J){throw H6(J),J}}))return d("tengu_version_lock_acquired",{is_pid_based:!0,is_lifetime_lock:!1,attempts:A+1}),!0;if(A++,A<O){let J=Math.min(w*Math.pow(2,A-1),j);await R7(J)}}return d("tengu_version_lock_failed",{is_pid_based:!0,is_lifetime_lock:!1,attempts:O}),BS8(q,Error("Lock held by another process")),!1}let $=null;try{try{$=await PJ(q,{stale:On1,retries:{retries:_,minTimeout:_>0?1000:100,maxTimeout:_>0?5000:500},lockfilePath:Y,onCompromised:(A)=>{N(`NON-FATAL: Version lock was compromised during operation: ${A.message}`,{level:"info"})}})}catch(A){return d("tengu_version_lock_failed",{is_pid_based:!1,is_lifetime_lock:!1}),BS8(q,A),!1}try{return await K(),d("tengu_version_lock_acquired",{is_pid_based:!1,is_lifetime_lock:!1}),!0}catch(A){throw H6(A),A}}finally{if($)await $()}}async function be4(q,K){await b26(So(K),{recursive:!0});let _=`${K}.tmp.${process.pid}.${Date.now()}`;try{await $n1(q,_),await IIz(_,493),await pS8(_,K),N(`Atomically installed binary to ${K}`)}catch(z){try{await MQ(_)}catch{}throw z}}async function QIz(q,K){try{let _=xX(q,"node_modules","@anthropic-ai"),Y=(await mS8(_)).find((A)=>A.startsWith("claude-cli-native-"));if(!Y)throw d("tengu_native_install_package_failure",{stage_find_package:!0,error_package_not_found:!0}),Error("Could not find platform-specific native package");let $=xX(_,Y,"cli");try{await hm($)}catch{throw d("tengu_native_install_package_failure",{stage_binary_exists:!0,error_binary_not_found:!0}),Error("Native binary not found in staged package")}await be4($,K),await gS8(q,{recursive:!0,force:!0}),d("tengu_native_install_package_success",{})}catch(_){let z=d6(_);if(!z.includes("Could not find platform-specific")&&!z.includes("Native binary not found"))d("tengu_native_install_package_failure",{stage_atomic_move:!0,error_move_failed:!0});throw H6(x1(_)),_}}async function dIz(q,K){try{let _=ho(),z=bS8(_),Y=xX(q,z);try{await hm(Y)}catch{throw d("tengu_native_install_binary_failure",{stage_binary_exists:!0,error_binary_not_found:!0}),Error("Staged binary not found")}await be4(Y,K),await gS8(q,{recursive:!0,force:!0}),d("tengu_native_install_binary_success",{})}catch(_){if(!d6(_).includes("Staged binary not found"))d("tengu_native_install_binary_failure",{stage_atomic_move:!0,error_move_failed:!0});throw H6(x1(_)),_}}async function cIz(q,K,_){if(_==="npm")await QIz(q,K);else await dIz(q,K)}async function Ee4(q,K){let{stagingPath:_,installPath:z}=await wn1(q),{executable:Y}=XQ(),$=i6("true")?`${_}.${process.pid}.${Date.now()}`:_,A=!await xe4(q)||K;if(A){N(K?`Force reinstalling native installer version ${q}`:`Downloading native installer version ${q}`);let O=await Ge4(q,$);await cIz($,z,O)}else N(`Version ${q} already installed, updating symlink`);if(await nIz(Y),await iIz(Y,z),!await C26(Y)){let O=!1;try{await hm(z),O=!0}catch{}throw Error(`Failed to create executable at ${Y}. Source file exists: ${O}. Check write permissions to ${Y}.`)}return A}async function xe4(q){let{installPath:K}=await wn1(q);return C26(K)}async function lIz(q,K=!1){let _=Date.now(),z=await fe4(q),{executable:Y}=XQ();if(N(`Checking for native installer update to version ${z}`),!K){let O=await I46();if(O&&Vv(z,O)){if(N(`Native installer: maxVersion ${O} is set, capping update from ${z} to ${O}`),yP({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.VERSION,O))return N(`Native installer: current version ${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.VERSION} is already at or above maxVersion ${O}, skipping update`),d("tengu_native_update_skipped_max_version",{latency_ms:Date.now()-_,max_version:O,available_version:z}),{success:!0,latestVersion:z};z=O}}if(!K&&z==={ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.VERSION&&await xe4(z)&&await C26(Y))return N(`Found ${z} at ${Y}, skipping install`),d("tengu_native_update_complete",{latency_ms:Date.now()-_,was_new_install:!1,was_force_reinstall:!1,was_already_running:!0}),{success:!0,latestVersion:z};if(!K&&ly6(z))return d("tengu_native_update_skipped_minimum_version",{latency_ms:Date.now()-_,target_version:z}),{success:!0,latestVersion:z};let $=!1,A;if(i6("true"))$=await Ee4(z,K),A=Date.now()-_;else{let{installPath:O}=await wn1(z);if(K)await oIz(O);let w=await Ce4(O,async()=>{$=await Ee4(z,K)},3);if(A=Date.now()-_,!w){let j=XQ(),H;if(m46()){let J=ut6(j,O);if(It6(J))H=S26(J)?.pid}return d("tengu_native_update_lock_failed",{latency_ms:A,lock_holder_pid:H}),{success:!1,latestVersion:z,lockFailed:!0,lockHolderPid:H}}}return d("tengu_native_update_complete",{latency_ms:A,was_new_install:$,was_force_reinstall:K}),N(`Successfully updated to version ${z}`),{success:!0,latestVersion:z}}async function nIz(q){try{await pIz(q),N(`Removed empty directory at ${q}`)}catch(K){let _=s1(K);if(_!=="ENOTDIR"&&_!=="ENOENT"&&_!=="ENOTEMPTY")N(`Could not remove directory at ${q}: ${K}`)}}async function iIz(q,K){if(ho().startsWith("win32"))try{let A=So(q);await b26(A,{recursive:!0});let O;try{O=await hm(q)}catch{}if(O){try{let j=await hm(K);if(O.size===j.size)return!1}catch{}let w=`${q}.old.${Date.now()}`;await pS8(q,w);try{await $n1(K,q);try{await MQ(w)}catch{}}catch(j){try{await pS8(w,q)}catch(H){let J=Error(`Failed to restore old executable: ${H}`,{cause:j});throw H6(J),J}throw j}}else try{await $n1(K,q)}catch(w){if(_7(w))throw Error(`Source file does not exist: ${K}`);throw w}return!0}catch(A){return H6(Error(`Failed to copy executable from ${K} to ${q}: ${A}`)),!1}let Y=So(q);try{await b26(Y,{recursive:!0}),N(`Created directory ${Y} for symlink`)}catch(A){return H6(Error(`Failed to create directory ${Y}: ${A}`)),!1}try{let A=!1;try{await hm(q),A=!0}catch{}if(A){try{let O=await An1(q),w=Co(So(q),O),j=Co(K);if(w===j)return!1}catch{}await MQ(q)}}catch(A){H6(Error(`Failed to check/remove existing symlink: ${A}`))}let $=`${q}.tmp.${process.pid}.${Date.now()}`;try{return await BIz(K,$),await pS8($,q),N(`Atomically updated symlink ${q} -> ${K}`),!0}catch(A){try{await MQ($)}catch{}return H6(Error(`Failed to create symlink from ${q} to ${K}: ${A}`)),!1}}async function x26(q=!1){if(i6(process.env.DISABLE_INSTALLATION_CHECKS))return[];let K=await Ro();if(K==="development")return[];let _=j8();if(!(q||K==="native"||_.installMethod==="native"))return[];let Y=XQ(),$=[],A=So(Y.executable),O=Co(A),j=ho().startsWith("win32");try{await he4(A)}catch{$.push({message:`installMethod is native, but directory ${A} does not exist`,userActionRequired:!0,type:"error"})}if(j){if(!await C26(Y.executable))$.push({message:`installMethod is native, but claude command is missing or invalid at ${Y.executable}`,userActionRequired:!0,type:"error"})}else try{let J=await An1(Y.executable),M=Co(So(Y.executable),J);if(!await C26(M))$.push({message:`Claude symlink points to missing or invalid binary: ${J}`,userActionRequired:!0,type:"error"})}catch(J){if(_7(J))$.push({message:`installMethod is native, but claude command not found at ${Y.executable}`,userActionRequired:!0,type:"error"});else if(!await C26(Y.executable))$.push({message:`${Y.executable} exists but is not a valid Claude binary`,userActionRequired:!0,type:"error"})}if(!(process.env.PATH||"").split(UIz).some((J)=>{try{let M=Co(J);if(j)return M.toLowerCase()===O.toLowerCase();return M===O}catch{return!1}}))if(j){let J=A.replace(/\//g,"\\");$.push({message:`Native installation exists but ${J} is not in your PATH. Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.`,userActionRequired:!0,type:"path"})}else{let J=cy6(),X=x46()[J],P=X?X.replace(Se4(),"~"):"your shell config file";$.push({message:`Native installation exists but ~/.local/bin is not in your PATH. Run:
2134
2135echo 'export PATH="$HOME/.local/bin:$PATH"' >> ${P} && source ${P}`,userActionRequired:!0,type:"path"})}return $}function I26(q,K=!1){if(K)return Le4(q,K);if(uS8)return N("installLatest: joining in-flight call"),uS8;let _=Le4(q,K);uS8=_;let z=()=>{uS8=null};return _.then(z,z),_}async function Le4(q,K=!1){let _=await lIz(q,K);if(!_.success)return{latestVersion:null,wasUpdated:!1,lockFailed:_.lockFailed,lockHolderPid:_.lockHolderPid};if(j8().installMethod!=="native")b8((Y)=>({...Y,installMethod:"native",autoUpdates:!1,autoUpdatesProtectedForNative:!0})),N('Native installer: Set installMethod to "native" and disabled legacy auto-updater for protection');return mt6(),{latestVersion:_.latestVersion,wasUpdated:_.success,lockFailed:!1}}async function rIz(q){try{let K=await An1(q),_=Co(So(q),K);if(await C26(_))return _}catch{}return null}function ut6(q,K){let _=FIz(K);return xX(q.locks,`${_}.lock`)}async function jn1(){let q=XQ();if(!process.execPath.includes(q.versions))return;let K=Co(process.execPath);try{let _=ut6(q,K);if(await b26(q.locks,{recursive:!0}),m46()){if(!await Ve4(K,_)){d("tengu_version_lock_failed",{is_pid_based:!0,is_lifetime_lock:!0}),BS8(K,Error("Lock already held by another process"));return}d("tengu_version_lock_acquired",{is_pid_based:!0,is_lifetime_lock:!0}),N(`Acquired PID lock on running version: ${K}`)}else{let z;try{z=await PJ(K,{stale:On1,retries:0,lockfilePath:_,onCompromised:(Y)=>{N(`NON-FATAL: Lock on running version was compromised: ${Y.message}`,{level:"info"})}}),d("tengu_version_lock_acquired",{is_pid_based:!1,is_lifetime_lock:!0}),N(`Acquired mtime-based lock on running version: ${K}`),pq(async()=>{try{await z?.()}catch{}})}catch(Y){if(_7(Y)){N(`Cannot lock current version - file does not exist: ${K}`,{level:"info"});return}d("tengu_version_lock_failed",{is_pid_based:!1,is_lifetime_lock:!0}),BS8(K,Y);return}}}catch(_){if(_7(_)){N(`Cannot lock current version - file does not exist: ${K}`,{level:"info"});return}N(`NON-FATAL: Failed to lock current version during execution ${d6(_)}`,{level:"info"})}}function BS8(q,K){H6(Error(`NON-FATAL: Lock acquisition failed for ${q} (expected in multi-process scenarios)`,{cause:K}))}async function oIz(q){let K=XQ(),_=ut6(K,q);try{await MQ(_),N(`Force-removed lock file at ${_}`)}catch(z){N(`Failed to force-remove lock file: ${d6(z)}`)}}async function mt6(){await Promise.resolve();let q=XQ(),K=Date.now()-3600000;if(ho().startsWith("win32")){let $=So(q.executable);try{let A=await mS8($),O=0;for(let w of A){if(!/^claude\.exe\.old\.\d+$/.test(w))continue;try{await MQ(xX($,w)),O++}catch{}}if(O>0)N(`Cleaned up ${O} old Windows executables on startup`)}catch(A){if(!_7(A))N(`Failed to clean up old Windows executables: ${A}`)}}try{let $=await mS8(q.staging),A=0;for(let O of $){let w=xX(q.staging,O);try{if((await hm(w)).mtime.getTime()<K)await gS8(w,{recursive:!0,force:!0}),A++,N(`Cleaned up old staging directory: ${O}`)}catch{}}if(A>0)N(`Cleaned up ${A} orphaned staging directories`),d("tengu_native_staging_cleanup",{cleaned_count:A})}catch($){if(!_7($))N(`Failed to clean up staging directories: ${$}`)}if(m46()){let $=IS8(q.locks);if($>0)N(`Cleaned up ${$} stale version locks`),d("tengu_native_stale_locks_cleanup",{cleaned_count:$})}let _;try{_=await mS8(q.versions)}catch($){if(!_7($))N(`Failed to readdir versions directory: ${$}`);return}let z=[],Y=0;for(let $ of _){let A=xX(q.versions,$);if(/\.tmp\.\d+\.\d+$/.test($)){try{if((await hm(A)).mtime.getTime()<K)await MQ(A),Y++,N(`Cleaned up orphaned temp install file: ${$}`)}catch{}continue}try{let O=await hm(A);if(!O.isFile())continue;if(process.platform!=="win32"&&O.size>0&&(O.mode&73)===0)continue;z.push({name:$,path:A,resolvedPath:Co(A),mtime:O.mtime})}catch{}}if(Y>0)N(`Cleaned up ${Y} orphaned temp install files`),d("tengu_native_temp_files_cleanup",{cleaned_count:Y});if(z.length===0)return;try{let $=process.execPath,A=new Set;if($&&$.includes(q.versions))A.add(Co($));let O=await rIz(q.executable);if(O)A.add(O);for(let X of z){if(A.has(X.resolvedPath))continue;let P=ut6(q,X.resolvedPath),W=!1;if(m46())W=It6(P);else try{W=await LCq(X.resolvedPath,{stale:On1,lockfilePath:P})}catch{W=!1}if(W)A.add(X.resolvedPath),N(`Protecting locked version from cleanup: ${X.name}`)}let j=z.filter((X)=>!A.has(X.resolvedPath)).sort((X,P)=>P.mtime.getTime()-X.mtime.getTime()).slice(Yn1);if(j.length===0){d("tengu_native_version_cleanup",{total_count:z.length,deleted_count:0,protected_count:A.size,retained_count:Yn1,lock_failed_count:0,error_count:0});return}let H=0,J=0,M=0;await Promise.all(j.map(async(X)=>{try{if(await Ce4(X.path,async()=>{await MQ(X.path)}))H++;else J++,N(`Skipping deletion of ${X.name} - locked by another process`)}catch(P){M++,H6(Error(`Failed to delete version ${X.name}: ${P}`))}})),d("tengu_native_version_cleanup",{total_count:z.length,deleted_count:H,protected_count:A.size,retained_count:Yn1,lock_failed_count:J,error_count:M})}catch($){if(!_7($))H6(Error(`Version cleanup failed: ${$}`))}}async function aIz(q){let K=q;if((await uIz(q)).isSymbolicLink())K=await mIz(q);return K.endsWith(".js")||K.includes("node_modules")}async function pt6(){let q=XQ();try{if(await aIz(q.executable)){N(`Skipping removal of ${q.executable} - appears to be npm-managed`);return}await MQ(q.executable),N(`Removed claude symlink at ${q.executable}`)}catch(K){if(_7(K))return;H6(Error(`Failed to remove claude symlink: ${K}`))}}async function Hn1(){let q=[],K=x46();for(let[_,z]of Object.entries(K))try{let Y=await ht6(z);if(!Y)continue;let{filtered:$,hadAlias:A}=fS8(Y);if(A)await ZS8(z,$),q.push({message:`Removed claude alias from ${z}. Run: unalias claude`,userActionRequired:!0,type:"alias"}),N(`Cleaned up claude alias from ${_} config`)}catch(Y){H6(Y),q.push({message:`Failed to clean up ${z}: ${Y}`,userActionRequired:!1,type:"error"})}return q}async function sIz(q){try{let K=await S7("npm",["config","get","prefix"]);if(K.code!==0||!K.stdout)return{success:!1,error:"Failed to get npm global prefix"};let _=K.stdout.trim(),z=!1;async function Y($,A){try{return await MQ($),N(`Manually removed ${A}: ${$}`),!0}catch{return!1}}if(ho().startsWith("win32")){let $=xX(_,"claude.cmd"),A=xX(_,"claude.ps1"),O=xX(_,"claude");if(await Y($,"bin script"))z=!0;if(await Y(A,"PowerShell script"))z=!0;if(await Y(O,"bin executable"))z=!0}else{let $=xX(_,"bin","claude");if(await Y($,"bin symlink"))z=!0}if(z){N(`Successfully removed ${q} manually`);let $=ho().startsWith("win32")?xX(_,"node_modules",q):xX(_,"lib","node_modules",q);return{success:!0,warning:`${q} executables removed, but node_modules directory was left intact for safety. You may manually delete it later at: ${$}`}}else return{success:!1}}catch(K){return N(`Manual removal failed: ${K}`,{level:"error"}),{success:!1,error:`Manual removal failed: ${K}`}}}async function Re4(q){let{code:K,stderr:_}=await S7("npm",["uninstall","-g",q],{cwd:process.cwd()});if(K===0)return N(`Removed global npm installation of ${q}`),{success:!0};else if(_&&!_.includes("npm ERR! code E404")){if(_.includes("npm error code ENOTEMPTY")){N(`Failed to uninstall global npm package ${q}: ${_}`,{level:"error"}),N("Attempting manual removal due to ENOTEMPTY error");let z=await sIz(q);if(z.success)return{success:!0,warning:z.warning};else if(z.error)return{success:!1,error:`Failed to remove global npm installation of ${q}: ${_}. Manual removal also failed: ${z.error}`}}return N(`Failed to uninstall global npm package ${q}: ${_}`,{level:"error"}),{success:!1,error:`Failed to remove global npm installation of ${q}: ${_}`}}return{success:!1}}async function Jn1(){let q=[],K=[],_=0,z=await Re4("@anthropic-ai/claude-code");if(z.success){if(_++,z.warning)K.push(z.warning)}else if(z.error)q.push(z.error);if({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL&&{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL!=="@anthropic-ai/claude-code"){let $=await Re4({ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.PACKAGE_URL);if($.success){if(_++,$.warning)K.push($.warning)}else if($.error)q.push($.error)}let Y=xX(Se4(),".claude","local");try{await gS8(Y,{recursive:!0}),_++,N(`Removed local installation at ${Y}`)}catch($){if(!_7($))q.push(`Failed to remove ${Y}: ${$}`),N(`Failed to remove local installation: ${$}`,{level:"error"})}return{removed:_,errors:q,warnings:K}}var Yn1=2,On1=604800000,uS8=null;var _n1=y(()=>{k8();Lo();c9();V1();_8();u46();y_();J16();m8();y8();XK();E26();E8();GS8();CS8();Te4();zn1()});var PQ=y(()=>{_n1()});function bo(){let q=y_6(),_=["user","project","local"].flatMap((z)=>SH(z).errors);return{settings:q.settings,errors:[...q.errors,..._]}}var Bt6=y(()=>{f0();U1()});function Ie4(){return[]}function ue4(q,K=null,_){let z=q?.find((Y)=>Y.name==="ide");if(K){let Y=pj(K.ideType),$=_m(K.ideType)?"plugin":"extension";if(K.error)return[{label:"IDE",value:Mn1.createElement(k,null,h7("error",_)(t6.cross)," Error installing ",Y," ",$,": ",K.error,`

Callers 1

Ce4Function · 0.85

Calls 3

ke4Function · 0.85
_Class · 0.70
zFunction · 0.70

Tested by

no test coverage detected