@github/copilot-linuxmusl-x64
Advanced tools
+3
-3
@@ -9,8 +9,8 @@ #!/usr/bin/env node | ||
| var Ve=Object.create;var B=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var M=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Ge=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of je(r))!qe.call(e,o)&&o!==t&&B(e,o,{get:()=>r[o],enumerable:!(n=Ue(r,o))||n.enumerable});return e};var Ke=(e,r,t)=>(t=e!=null?Ve(We(e)):{},Ge(r||!e||!e.__esModule?B(t,"default",{value:e,enumerable:!0}):t,e));var X=E((Jr,z)=>{"use strict";var Y=()=>process.platform==="linux",C=null,Ze=()=>{if(!C)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,C=process.report.getReport(),process.report.excludeNetwork=e}else C={};return C};z.exports={isLinux:Y,getReport:Ze}});var Z=E((Yr,Q)=>{"use strict";var y=M("fs"),er="/usr/bin/ldd",rr="/proc/self/exe",L=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(L),n=y.readSync(r,t,0,L,0);return y.close(r,()=>{}),t.subarray(0,n)},nr=e=>new Promise((r,t)=>{y.open(e,"r",(n,o)=>{if(n)t(n);else{let i=Buffer.alloc(L);y.read(o,i,0,L,0,(s,a)=>{r(i.subarray(0,a)),y.close(o,()=>{})})}})});Q.exports={LDD_PATH:er,SELF_PATH:rr,readFileSync:tr,readFile:nr}});var re=E((zr,ee)=>{"use strict";var or=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let r=e.readUInt32LE(32),t=e.readUInt16LE(54),n=e.readUInt16LE(56);for(let o=0;o<n;o++){let i=r+o*t;if(e.readUInt32LE(i)===3){let a=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(a,a+h).toString().replace(/\0.*$/g,"")}}return null};ee.exports={interpreterPath:or}});var Ee=E((Xr,ve)=>{"use strict";var ne=M("child_process"),{isLinux:b,getReport:oe}=X(),{LDD_PATH:S,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=re(),u,f,d,ae="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ce=()=>m||new Promise(e=>{ne.exec(ae,(r,t)=>{m=r?" ":t,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ae,{encoding:"utf8"})}catch{m=" "}return m},p="glibc",ue=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,g="musl",ir=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),fe=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?p:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ir)?g:null},de=e=>{let[r,t]=e.split(/[\r\n]+/);return r&&r.includes(p)?p:t&&t.includes(g)?g:null},pe=e=>{if(e){if(e.includes("/ld-musl-"))return g;if(e.includes("/ld-linux-"))return p}return null},me=e=>(e=e.toString(),e.includes("musl")?g:e.includes("GNU C Library")?p:null),sr=async()=>{if(f!==void 0)return f;f=null;try{let e=await w(S);f=me(e)}catch{}return f},ar=()=>{if(f!==void 0)return f;f=null;try{let e=I(S);f=me(e)}catch{}return f},cr=async()=>{if(u!==void 0)return u;u=null;try{let e=await w(ie),r=se(e);u=pe(r)}catch{}return u},lr=()=>{if(u!==void 0)return u;u=null;try{let e=I(ie),r=se(e);u=pe(r)}catch{}return u},ge=async()=>{let e=null;if(b()&&(e=await cr(),!e&&(e=await sr(),e||(e=fe()),!e))){let r=await ce();e=de(r)}return e},he=()=>{let e=null;if(b()&&(e=lr(),!e&&(e=ar(),e||(e=fe()),!e))){let r=le();e=de(r)}return e},ur=async()=>b()&&await ge()!==p,fr=()=>b()&&he()!==p,dr=async()=>{if(d!==void 0)return d;d=null;try{let r=(await w(S)).match(ue);r&&(d=r[1])}catch{}return d},pr=()=>{if(d!==void 0)return d;d=null;try{let r=I(S).match(ue);r&&(d=r[1])}catch{}return d},ye=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},te=e=>e.trim().split(/\s+/)[1],be=e=>{let[r,t,n]=e.split(/[\r\n]+/);return r&&r.includes(p)?te(r):t&&n&&t.includes(g)?te(n):null},mr=async()=>{let e=null;if(b()&&(e=await dr(),e||(e=ye()),!e)){let r=await ce();e=be(r)}return e},gr=()=>{let e=null;if(b()&&(e=pr(),e||(e=ye()),!e)){let r=le();e=be(r)}return e};ve.exports={GLIBC:p,MUSL:g,family:ge,familySync:he,isNonGlibcLinux:ur,isNonGlibcLinuxSync:fr,version:mr,versionSync:gr}});import $r from"node:module";import{dirname as Dr,join as Br}from"node:path";import*as Me from"node:sea";import{fileURLToPath as Mr,pathToFileURL as H}from"node:url";import{basename as hr,join as N}from"node:path";var V="0.0.1";import{readdir as Je,access as Ye,constants as ze}from"node:fs/promises";import{join as c,basename as U}from"node:path";import{homedir as x}from"node:os";function W(){return process.env.XDG_CACHE_HOME||c(x(),".cache")}function q(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function G(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function Xe(){if(process.platform==="darwin")return c(x(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||c(x(),".cache");return c(e,"copilot")}return c(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(c(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(c(Xe(),"pkg")),e.push(c(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(c(process.env.COPILOT_HOME,"pkg")),e.push(c(x(),".copilot","pkg")),[...new Set(e)]}function j(e){let r=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(r)return[Number(r[1]),Number(r[2]),Number(r[3])]}function Qe(e,r){let t=j(e),n=j(r);if(!t&&!n)return 0;if(!t)return-1;if(!n)return 1;for(let s=0;s<3;s++)if(t[s]!==n[s])return t[s]-n[s];let o=e.includes("-"),i=r.includes("-");return o!==i?o?-1:1:e.localeCompare(r)}async function J(e,...r){let t=[];for(let n of r){let o;try{o=await Je(n)}catch{continue}for(let i of o){let s=c(n,i);try{await Ye(c(s,e),ze.R_OK),t.push(s)}catch{continue}}}return t.sort((n,o)=>{let i=Qe(U(o),U(n));return i!==0?i:n.localeCompare(o)}),t}import{join as Ce}from"node:path";var P=Ke(Ee(),1);function T(e={}){return(e.platform??process.platform)!=="linux"?"gnu":(e.detectLibcFamily??P.familySync)()===P.MUSL?"musl":"gnu"}function A(e=process.platform,r){let t=r??(e==="linux"?T():"gnu");return e==="linux"&&t==="musl"?"linuxmusl":e}function xe(e=process.platform,r,t=process.arch){return`${A(e,r)}-${t}`}function Le(){let e=xe();return K().flatMap(r=>[Ce(r,"universal"),Ce(r,e)])}function yr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.72-1"}async function Se(e,r){let t=N(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Le(),s=await J("app.js",...i);if(o){let a=s.find(h=>hr(h)===o);a?t=N(a,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| var Ve=Object.create;var B=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var M=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Ge=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of je(r))!qe.call(e,o)&&o!==t&&B(e,o,{get:()=>r[o],enumerable:!(n=Ue(r,o))||n.enumerable});return e};var Ke=(e,r,t)=>(t=e!=null?Ve(We(e)):{},Ge(r||!e||!e.__esModule?B(t,"default",{value:e,enumerable:!0}):t,e));var X=E((Jr,z)=>{"use strict";var Y=()=>process.platform==="linux",C=null,Ze=()=>{if(!C)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,C=process.report.getReport(),process.report.excludeNetwork=e}else C={};return C};z.exports={isLinux:Y,getReport:Ze}});var Z=E((Yr,Q)=>{"use strict";var y=M("fs"),er="/usr/bin/ldd",rr="/proc/self/exe",S=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(S),n=y.readSync(r,t,0,S,0);return y.close(r,()=>{}),t.subarray(0,n)},nr=e=>new Promise((r,t)=>{y.open(e,"r",(n,o)=>{if(n)t(n);else{let i=Buffer.alloc(S);y.read(o,i,0,S,0,(s,a)=>{r(i.subarray(0,a)),y.close(o,()=>{})})}})});Q.exports={LDD_PATH:er,SELF_PATH:rr,readFileSync:tr,readFile:nr}});var re=E((zr,ee)=>{"use strict";var or=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let r=e.readUInt32LE(32),t=e.readUInt16LE(54),n=e.readUInt16LE(56);for(let o=0;o<n;o++){let i=r+o*t;if(e.readUInt32LE(i)===3){let a=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(a,a+h).toString().replace(/\0.*$/g,"")}}return null};ee.exports={interpreterPath:or}});var Ee=E((Xr,ve)=>{"use strict";var ne=M("child_process"),{isLinux:b,getReport:oe}=X(),{LDD_PATH:L,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=re(),u,f,d,ae="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ce=()=>m||new Promise(e=>{ne.exec(ae,(r,t)=>{m=r?" ":t,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ae,{encoding:"utf8"})}catch{m=" "}return m},p="glibc",ue=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,g="musl",ir=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),fe=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?p:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ir)?g:null},de=e=>{let[r,t]=e.split(/[\r\n]+/);return r&&r.includes(p)?p:t&&t.includes(g)?g:null},pe=e=>{if(e){if(e.includes("/ld-musl-"))return g;if(e.includes("/ld-linux-"))return p}return null},me=e=>(e=e.toString(),e.includes("musl")?g:e.includes("GNU C Library")?p:null),sr=async()=>{if(f!==void 0)return f;f=null;try{let e=await w(L);f=me(e)}catch{}return f},ar=()=>{if(f!==void 0)return f;f=null;try{let e=I(L);f=me(e)}catch{}return f},cr=async()=>{if(u!==void 0)return u;u=null;try{let e=await w(ie),r=se(e);u=pe(r)}catch{}return u},lr=()=>{if(u!==void 0)return u;u=null;try{let e=I(ie),r=se(e);u=pe(r)}catch{}return u},ge=async()=>{let e=null;if(b()&&(e=await cr(),!e&&(e=await sr(),e||(e=fe()),!e))){let r=await ce();e=de(r)}return e},he=()=>{let e=null;if(b()&&(e=lr(),!e&&(e=ar(),e||(e=fe()),!e))){let r=le();e=de(r)}return e},ur=async()=>b()&&await ge()!==p,fr=()=>b()&&he()!==p,dr=async()=>{if(d!==void 0)return d;d=null;try{let r=(await w(L)).match(ue);r&&(d=r[1])}catch{}return d},pr=()=>{if(d!==void 0)return d;d=null;try{let r=I(L).match(ue);r&&(d=r[1])}catch{}return d},ye=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},te=e=>e.trim().split(/\s+/)[1],be=e=>{let[r,t,n]=e.split(/[\r\n]+/);return r&&r.includes(p)?te(r):t&&n&&t.includes(g)?te(n):null},mr=async()=>{let e=null;if(b()&&(e=await dr(),e||(e=ye()),!e)){let r=await ce();e=be(r)}return e},gr=()=>{let e=null;if(b()&&(e=pr(),e||(e=ye()),!e)){let r=le();e=be(r)}return e};ve.exports={GLIBC:p,MUSL:g,family:ge,familySync:he,isNonGlibcLinux:ur,isNonGlibcLinuxSync:fr,version:mr,versionSync:gr}});import $r from"node:module";import{dirname as Dr,join as Br}from"node:path";import*as Me from"node:sea";import{fileURLToPath as Mr,pathToFileURL as H}from"node:url";import{basename as hr,join as N}from"node:path";var V="0.0.1";import{readdir as Je,access as Ye,constants as ze}from"node:fs/promises";import{join as c,basename as U}from"node:path";import{homedir as x}from"node:os";function W(){return process.env.XDG_CACHE_HOME||c(x(),".cache")}function q(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function G(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function Xe(){if(process.platform==="darwin")return c(x(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||c(x(),".cache");return c(e,"copilot")}return c(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(c(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(c(Xe(),"pkg")),e.push(c(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(c(process.env.COPILOT_HOME,"pkg")),e.push(c(x(),".copilot","pkg")),[...new Set(e)]}function j(e){let r=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(r)return[Number(r[1]),Number(r[2]),Number(r[3])]}function Qe(e,r){let t=j(e),n=j(r);if(!t&&!n)return 0;if(!t)return-1;if(!n)return 1;for(let s=0;s<3;s++)if(t[s]!==n[s])return t[s]-n[s];let o=e.includes("-"),i=r.includes("-");return o!==i?o?-1:1:e.localeCompare(r)}async function J(e,...r){let t=[];for(let n of r){let o;try{o=await Je(n)}catch{continue}for(let i of o){let s=c(n,i);try{await Ye(c(s,e),ze.R_OK),t.push(s)}catch{continue}}}return t.sort((n,o)=>{let i=Qe(U(o),U(n));return i!==0?i:n.localeCompare(o)}),t}import{join as Ce}from"node:path";var P=Ke(Ee(),1);function T(e={}){return(e.platform??process.platform)!=="linux"?"gnu":e.detectLibcFamily?e.detectLibcFamily()==="musl"?"musl":"gnu":(0,P.familySync)()===P.MUSL?"musl":"gnu"}function A(e=process.platform,r){let t=r??(e==="linux"?T():"gnu");return e==="linux"&&t==="musl"?"linuxmusl":e}function xe(e=process.platform,r,t=process.arch){return`${A(e,r)}-${t}`}function Se(){let e=xe();return K().flatMap(r=>[Ce(r,"universal"),Ce(r,e)])}function yr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.72"}async function Le(e,r){let t=N(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Se(),s=await J("app.js",...i);if(o){let a=s.find(h=>hr(h)===o);a?t=N(a,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| `)}else s.length>0&&(t=N(s[0],"app.js"))}return t}import{existsSync as br}from"node:fs";import{basename as vr,resolve as Er}from"node:path";var Pe="extension_bootstrap.mjs";function Te(e,r,t=br){let n=e.find(s=>vr(s)===Pe);if(!n)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${r}, argv-bootstrap=${n} | ||
| `);let o=Er(r,"preloads",Pe),i=t(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${i} | ||
| `),i)return o}var xr=new Set(["--server","--headless","--acp","--embedded-host"]),Cr=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function Lr(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function Sr(e){if(e.some(t=>xr.has(t)||Lr(t)))return!0;let r=e.find(t=>!t.startsWith("-"));return r!==void 0&&Cr.has(r)}function Oe(e){return!Sr(e)}var Pr="github.copilot.cli.typeahead.capture",_e=Symbol.for(Pr);function F(){let e=globalThis,r=e[_e];return r||(r={buffer:[],capturing:!1,listener:null,exitHandler:null},e[_e]=r),r}var k=class{detachListener(r){r.listener&&(process.stdin.removeListener("data",r.listener),r.listener=null)}clearExitHandler(r){r.exitHandler&&(process.removeListener("exit",r.exitHandler),r.exitHandler=null)}start(){let r=F();if(!process.stdin.isTTY||typeof process.stdin.setRawMode!="function"||r.capturing)return;try{process.stdin.setRawMode(!0)}catch{return}if(!r.exitHandler){let n=()=>{if(r.capturing)try{process.stdin.setRawMode(!1)}catch{}};r.exitHandler=n,process.once("exit",n)}let t=n=>{if(n.length===1&&n[0]===3){this.dispose(),process.kill(process.pid,"SIGINT");return}r.buffer.push(Buffer.from(n))};r.listener=t,process.stdin.on("data",t),process.stdin.unref(),r.capturing=!0}drain(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.capturing=!1,r.buffer.length===0)return null;let t=Buffer.concat(r.buffer);return r.buffer=[],t}dispose(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.buffer=[],!!r.capturing){try{process.stdin.setRawMode(!1)}catch{}process.stdin.pause(),r.capturing=!1}}},we=new k;import Re from"node:path";import{fileURLToPath as Rr}from"node:url";function Tr(e){if(e.includes("<!DOCTYPE")||e.includes("<html")){let r=Math.min(e.indexOf("<!DOCTYPE")!==-1?e.indexOf("<!DOCTYPE"):1/0,e.indexOf("<html")!==-1?e.indexOf("<html"):1/0),t=e.substring(0,r).trim();return t?`${t} [HTML error page omitted]`:"[HTML error page omitted]"}return e}function Ie(e){let r;if(e instanceof Error)r=String(e);else if(typeof e=="object"&&e!==null)try{r=JSON.stringify(e)??"[object]"}catch{return"[object with circular reference]"}else r=String(e);return Tr(r)}import{createRequire as Or}from"node:module";import{platform as _r,type as wr}from"node:os";import{join as Ae,resolve as Ir}from"node:path";import{fileURLToPath as Ar}from"node:url";function Nr(){let e=Fe(),r=e==="linux"?T({platform:e}):"gnu";return`${A(e,r)}-${process.arch}`}function Fr(){let e=Fe(),{arch:r}=process;switch(e){case"win32":return`win32-${r}-msvc`;case"darwin":return`darwin-${r}`;case"linux":return`linux-${r}-${T({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${r}`)}}var l;function Fe(){if(l!==void 0)return l;switch(wr()){case"Windows_NT":l="win32";break;case"Darwin":l="darwin";break;case"Linux":l="linux";break;case"AIX":l="aix";break;case"FreeBSD":case"DragonFly":l="freebsd";break;case"OpenBSD":l="openbsd";break;case"NetBSD":l="netbsd";break;case"SunOS":l="sunos";break;default:l=_r();break}return l}function ke(e,r){let t=Nr(),n=`${e}.node`,o=`${e}.${Fr()}.node`,i=[];for(let a of r){let h=Ir(a),$=Ae(h,"prebuilds",t,n),O=Ne($);if(O.ok)return O.value;i.push({path:$,err:O.err});let D=Ae(h,o),_=Ne(D);if(_.ok)return _.value;i.push({path:D,err:_.err})}let s=i.map(a=>` ${a.path}: ${kr(a.err)}`).join(` | ||
| `),i)return o}var xr=new Set(["--server","--headless","--acp","--embedded-host"]),Cr=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function Sr(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function Lr(e){if(e.some(t=>xr.has(t)||Sr(t)))return!0;let r=e.find(t=>!t.startsWith("-"));return r!==void 0&&Cr.has(r)}function Oe(e){return!Lr(e)}var Pr="github.copilot.cli.typeahead.capture",_e=Symbol.for(Pr);function F(){let e=globalThis,r=e[_e];return r||(r={buffer:[],capturing:!1,listener:null,exitHandler:null},e[_e]=r),r}var k=class{detachListener(r){r.listener&&(process.stdin.removeListener("data",r.listener),r.listener=null)}clearExitHandler(r){r.exitHandler&&(process.removeListener("exit",r.exitHandler),r.exitHandler=null)}start(){let r=F();if(!process.stdin.isTTY||typeof process.stdin.setRawMode!="function"||r.capturing)return;try{process.stdin.setRawMode(!0)}catch{return}if(!r.exitHandler){let n=()=>{if(r.capturing)try{process.stdin.setRawMode(!1)}catch{}};r.exitHandler=n,process.once("exit",n)}let t=n=>{if(n.length===1&&n[0]===3){this.dispose(),process.kill(process.pid,"SIGINT");return}r.buffer.push(Buffer.from(n))};r.listener=t,process.stdin.on("data",t),process.stdin.unref(),r.capturing=!0}drain(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.capturing=!1,r.buffer.length===0)return null;let t=Buffer.concat(r.buffer);return r.buffer=[],t}dispose(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.buffer=[],!!r.capturing){try{process.stdin.setRawMode(!1)}catch{}process.stdin.pause(),r.capturing=!1}}},we=new k;import Re from"node:path";import{fileURLToPath as Rr}from"node:url";function Tr(e){if(e.includes("<!DOCTYPE")||e.includes("<html")){let r=Math.min(e.indexOf("<!DOCTYPE")!==-1?e.indexOf("<!DOCTYPE"):1/0,e.indexOf("<html")!==-1?e.indexOf("<html"):1/0),t=e.substring(0,r).trim();return t?`${t} [HTML error page omitted]`:"[HTML error page omitted]"}return e}function Ie(e){let r;if(e instanceof Error)r=String(e);else if(typeof e=="object"&&e!==null)try{r=JSON.stringify(e)??"[object]"}catch{return"[object with circular reference]"}else r=String(e);return Tr(r)}import{createRequire as Or}from"node:module";import{platform as _r,type as wr}from"node:os";import{join as Ae,resolve as Ir}from"node:path";import{fileURLToPath as Ar}from"node:url";function Nr(){let e=Fe(),r=e==="linux"?T({platform:e}):"gnu";return`${A(e,r)}-${process.arch}`}function Fr(){let e=Fe(),{arch:r}=process;switch(e){case"win32":return`win32-${r}-msvc`;case"darwin":return`darwin-${r}`;case"linux":return`linux-${r}-${T({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${r}`)}}var l;function Fe(){if(l!==void 0)return l;switch(wr()){case"Windows_NT":l="win32";break;case"Darwin":l="darwin";break;case"Linux":l="linux";break;case"AIX":l="aix";break;case"FreeBSD":case"DragonFly":l="freebsd";break;case"OpenBSD":l="openbsd";break;case"NetBSD":l="netbsd";break;case"SunOS":l="sunos";break;default:l=_r();break}return l}function ke(e,r){let t=Nr(),n=`${e}.node`,o=`${e}.${Fr()}.node`,i=[];for(let a of r){let h=Ir(a),$=Ae(h,"prebuilds",t,n),O=Ne($);if(O.ok)return O.value;i.push({path:$,err:O.err});let D=Ae(h,o),_=Ne(D);if(_.ok)return _.value;i.push({path:D,err:_.err})}let s=i.map(a=>` ${a.path}: ${kr(a.err)}`).join(` | ||
| `);throw new Error(`Native addon "${e}" not found for ${t}. Tried: | ||
| ${s}`)}function kr(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}}function Ne(e){try{return{ok:!0,value:Hr(e)}}catch(r){return{ok:!1,err:r}}}function Hr(e){return Or(Ar(import.meta.url))(e)}var v,He=Re.dirname(Rr(import.meta.url));function $e(){if(v){if(v.kind==="ok")return v.addon;throw v.error}try{let e=ke("cli-native",[He,Re.resolve(He,"..","native","cli")]);return v={kind:"ok",addon:e},e}catch(e){let r=e instanceof Error?e:new Error(`Failed to load cli-native addon: ${Ie(e)}`);throw v={kind:"error",error:r},r}}function De(){if(process.platform==="win32")return $e()}try{$r.enableCompileCache?.()}catch{}var R=Dr(Mr(import.meta.url)),Vr=Me.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=De();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var Be=Te(process.argv,R);if(Be)await import(H(Be).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=Br(R,"voice-server.js");try{let{runVoiceServer:r}=await import(H(e).href);await r()}catch(r){process.stderr.write(`voice server: fatal at ${e}: ${r.stack??String(r)} | ||
| `),process.exit(1)}}else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:r,body:t}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:r,body:t,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else{Oe(process.argv.slice(2))&&we.start();let e=await Se(R,Vr);await import(H(e).href)} | ||
| `),process.exit(1)}}else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:r,body:t}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:r,body:t,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else{Oe(process.argv.slice(2))&&we.start();let e=await Le(R,Vr);await import(H(e).href)} |
+1
-1
| { | ||
| "name": "@github/copilot-linuxmusl-x64", | ||
| "version": "1.0.72-1", | ||
| "version": "1.0.72", | ||
| "description": "GitHub Copilot CLI for linuxmusl-x64", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 4 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 5 instances
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
355253906
2.15%171065
1.57%9
-10%148
-1.33%