@github/copilot-darwin-arm64
Advanced tools
+6
-6
@@ -9,8 +9,8 @@ #!/usr/bin/env node | ||
| var Ve=Object.create;var $=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var B=(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&&$(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?$(t,"default",{value:e,enumerable:!0}):t,e));var X=E((Yr,z)=>{"use strict";var J=()=>process.platform==="linux",C=null,Ze=()=>{if(!C)if(J()&&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:J,getReport:Ze}});var Z=E((Jr,Q)=>{"use strict";var y=B("fs"),er="/usr/bin/ldd",rr="/proc/self/exe",P=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(P),n=y.readSync(r,t,0,P,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(P);y.read(o,i,0,P,0,(s,c)=>{r(i.subarray(0,c)),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 c=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(c,c+h).toString().replace(/\0.*$/g,"")}}return null};ee.exports={interpreterPath:or}});var Ee=E((Xr,ve)=>{"use strict";var ne=B("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 Dr from"node:module";import{dirname as Mr,join as $r}from"node:path";import*as Be from"node:sea";import{fileURLToPath as Br,pathToFileURL as k}from"node:url";import{basename as hr,join as N}from"node:path";var V="0.0.1";import{readdir as Ye,access as Je,constants as ze}from"node:fs/promises";import{join as a,basename as U}from"node:path";import{homedir as x}from"node:os";function W(){return process.env.XDG_CACHE_HOME||a(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 a(x(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||a(x(),".cache");return a(e,"copilot")}return a(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_PKG_CACHE_HOME&&e.push(a(process.env.COPILOT_PKG_CACHE_HOME,"pkg")),process.env.COPILOT_CACHE_HOME&&e.push(a(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(a(Xe(),"pkg")),e.push(a(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(a(process.env.COPILOT_HOME,"pkg")),e.push(a(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 Y(e,...r){let t=[];for(let n of r){let o;try{o=await Ye(n)}catch{continue}for(let i of o){let s=a(n,i);try{await Je(a(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 O=Ke(Ee(),1);function S(e={}){return(e.platform??process.platform)!=="linux"?"gnu":e.detectLibcFamily?e.detectLibcFamily()==="musl"?"musl":"gnu":(0,O.familySync)()===O.MUSL?"musl":"gnu"}function A(e=process.platform,r){let t=r??(e==="linux"?S():"gnu");return e==="linux"&&t==="musl"?"linuxmusl":e}function xe(e=process.platform,r,t=process.arch){return`${A(e,r)}-${t}`}function Pe(){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.79-3"}async function Le(e,r){let t=N(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Pe(),s=await Y("app.js",...i);if(o){let c=s.find(h=>hr(h)===o);c?t=N(c,"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 Oe="extension_bootstrap.mjs";function Se(e,r,t=br){let n=e.find(s=>vr(s)===Oe);if(!n)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${r}, argv-bootstrap=${n} | ||
| `);let o=Er(r,"preloads",Oe),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 Pr(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)||Pr(t)))return!0;let r=e.find(t=>!t.startsWith("-"));return r!==void 0&&Cr.has(r)}function Te(e){return!Lr(e)}var Or="github.copilot.cli.typeahead.capture",_e=Symbol.for(Or);function F(){let e=globalThis,r=e[_e];return r||(r={buffer:[],capturing:!1,listener:null,exitHandler:null},e[_e]=r),r}var H=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 H;import Re from"node:path";import{fileURLToPath as Rr}from"node:url";function Sr(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 Sr(r)}import{createRequire as Tr}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"?S({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}-${S({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 He(e,r){let t=Nr(),n=`${e}.node`,o=`${e}.${Fr()}.node`,i=[];for(let c of r){let h=Ir(c),D=Ae(h,"prebuilds",t,n),T=Ne(D);if(T.ok)return T.value;i.push({path:D,err:T.err});let M=Ae(h,o),_=Ne(M);if(_.ok)return _.value;i.push({path:M,err:_.err})}let s=i.map(c=>` ${c.path}: ${Hr(c.err)}`).join(` | ||
| var je=Object.create;var B=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ge=Object.getPrototypeOf,Ke=Object.prototype.hasOwnProperty;var V=(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 b=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Ye=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of qe(r))!Ke.call(e,o)&&o!==t&&B(e,o,{get:()=>r[o],enumerable:!(n=We(r,o))||n.enumerable});return e};var Je=(e,r,t)=>(t=e!=null?je(Ge(e)):{},Ye(r||!e||!e.__esModule?B(t,"default",{value:e,enumerable:!0}):t,e));var Q=b((Qr,X)=>{"use strict";var z=()=>process.platform==="linux",C=null,rr=()=>{if(!C)if(z()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,C=process.report.getReport(),process.report.excludeNetwork=e}else C={};return C};X.exports={isLinux:z,getReport:rr}});var ee=b((Zr,Z)=>{"use strict";var x=V("fs"),tr="/usr/bin/ldd",nr="/proc/self/exe",P=2048,or=e=>{let r=x.openSync(e,"r"),t=Buffer.alloc(P),n=x.readSync(r,t,0,P,0);return x.close(r,()=>{}),t.subarray(0,n)},ir=e=>new Promise((r,t)=>{x.open(e,"r",(n,o)=>{if(n)t(n);else{let i=Buffer.alloc(P);x.read(o,i,0,P,0,(s,c)=>{r(i.subarray(0,c)),x.close(o,()=>{})})}})});Z.exports={LDD_PATH:tr,SELF_PATH:nr,readFileSync:or,readFile:ir}});var te=b((et,re)=>{"use strict";var sr=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 c=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(c,c+h).toString().replace(/\0.*$/g,"")}}return null};re.exports={interpreterPath:sr}});var Ee=b((rt,be)=>{"use strict";var oe=V("child_process"),{isLinux:y,getReport:ie}=Q(),{LDD_PATH:L,SELF_PATH:se,readFile:A,readFileSync:I}=ee(),{interpreterPath:ae}=te(),u,f,p,ce="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",le=()=>m||new Promise(e=>{oe.exec(ce,(r,t)=>{m=r?" ":t,e(m)})}),ue=()=>{if(!m)try{m=oe.execSync(ce,{encoding:"utf8"})}catch{m=" "}return m},d="glibc",fe=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,g="musl",ar=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),pe=()=>{let e=ie();return e.header&&e.header.glibcVersionRuntime?d:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ar)?g:null},de=e=>{let[r,t]=e.split(/[\r\n]+/);return r&&r.includes(d)?d:t&&t.includes(g)?g:null},me=e=>{if(e){if(e.includes("/ld-musl-"))return g;if(e.includes("/ld-linux-"))return d}return null},ge=e=>(e=e.toString(),e.includes("musl")?g:e.includes("GNU C Library")?d:null),cr=async()=>{if(f!==void 0)return f;f=null;try{let e=await A(L);f=ge(e)}catch{}return f},lr=()=>{if(f!==void 0)return f;f=null;try{let e=I(L);f=ge(e)}catch{}return f},ur=async()=>{if(u!==void 0)return u;u=null;try{let e=await A(se),r=ae(e);u=me(r)}catch{}return u},fr=()=>{if(u!==void 0)return u;u=null;try{let e=I(se),r=ae(e);u=me(r)}catch{}return u},he=async()=>{let e=null;if(y()&&(e=await ur(),!e&&(e=await cr(),e||(e=pe()),!e))){let r=await le();e=de(r)}return e},xe=()=>{let e=null;if(y()&&(e=fr(),!e&&(e=lr(),e||(e=pe()),!e))){let r=ue();e=de(r)}return e},pr=async()=>y()&&await he()!==d,dr=()=>y()&&xe()!==d,mr=async()=>{if(p!==void 0)return p;p=null;try{let r=(await A(L)).match(fe);r&&(p=r[1])}catch{}return p},gr=()=>{if(p!==void 0)return p;p=null;try{let r=I(L).match(fe);r&&(p=r[1])}catch{}return p},ye=()=>{let e=ie();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},ne=e=>e.trim().split(/\s+/)[1],ve=e=>{let[r,t,n]=e.split(/[\r\n]+/);return r&&r.includes(d)?ne(r):t&&n&&t.includes(g)?ne(n):null},hr=async()=>{let e=null;if(y()&&(e=await mr(),e||(e=ye()),!e)){let r=await le();e=ve(r)}return e},xr=()=>{let e=null;if(y()&&(e=gr(),e||(e=ye()),!e)){let r=ue();e=ve(r)}return e};be.exports={GLIBC:d,MUSL:g,family:he,familySync:xe,isNonGlibcLinux:pr,isNonGlibcLinuxSync:dr,version:hr,versionSync:xr}});import Vr from"node:module";import{dirname as Ur,join as jr}from"node:path";import*as Ue from"node:sea";import{fileURLToPath as Wr,pathToFileURL as H}from"node:url";import{basename as yr,join as N}from"node:path";var U="0.0.1";import{readdir as ze,access as Xe,constants as Qe}from"node:fs/promises";import{join as a,basename as j}from"node:path";import{homedir as E}from"node:os";function q(){return process.env.XDG_CACHE_HOME||a(E(),".cache")}function G(){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 K(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function Ze(){if(process.platform==="darwin")return a(E(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||a(E(),".cache");return a(e,"copilot")}return a(q(),"copilot")}function Y(){let e=[];return process.env.COPILOT_PKG_CACHE_HOME&&e.push(a(process.env.COPILOT_PKG_CACHE_HOME,"pkg")),process.env.COPILOT_CACHE_HOME&&e.push(a(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(a(Ze(),"pkg")),e.push(a(q(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(a(process.env.COPILOT_HOME,"pkg")),e.push(a(E(),".copilot","pkg")),[...new Set(e)]}function W(e){let r=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(r)return[Number(r[1]),Number(r[2]),Number(r[3])]}function er(e,r){let t=W(e),n=W(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 ze(n)}catch{continue}for(let i of o){let s=a(n,i);try{await Xe(a(s,e),Qe.R_OK),t.push(s)}catch{continue}}}return t.sort((n,o)=>{let i=er(j(o),j(n));return i!==0?i:n.localeCompare(o)}),t}import{join as Pe}from"node:path";var O=Je(Ee(),1);function S(e={}){return(e.platform??process.platform)!=="linux"?"gnu":e.detectLibcFamily?e.detectLibcFamily()==="musl"?"musl":"gnu":(0,O.familySync)()===O.MUSL?"musl":"gnu"}function R(e=process.platform,r){let t=r??(e==="linux"?S():"gnu");return e==="linux"&&t==="musl"?"linuxmusl":e}function Ce(e=process.platform,r,t=process.arch){return`${R(e,r)}-${t}`}function Le(){let e=Ce();return Y().flatMap(r=>[Pe(r,"universal"),Pe(r,e)])}function vr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.79-4"}async function Oe(e,r){let t=N(e,"app.js"),n=vr()===U,o=K();if(r&&(o||G()&&!n)){let i=Le(),s=await J("app.js",...i);if(o){let c=s.find(h=>yr(h)===o);c?t=N(c,"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 Re from"node:path";import{fileURLToPath as Ar}from"node:url";function br(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 Se(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 br(r)}import{createRequire as Er}from"node:module";import{platform as Cr,type as Pr}from"node:os";import{join as Te,resolve as Lr}from"node:path";import{fileURLToPath as Or}from"node:url";function Sr(){let e=we(),r=e==="linux"?S({platform:e}):"gnu";return`${R(e,r)}-${process.arch}`}function Tr(){let e=we(),{arch:r}=process;switch(e){case"win32":return`win32-${r}-msvc`;case"darwin":return`darwin-${r}`;case"linux":return`linux-${r}-${S({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${r}`)}}var l;function we(){if(l!==void 0)return l;switch(Pr()){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=Cr();break}return l}function Ae(e,r){let t=Sr(),n=`${e}.node`,o=`${e}.${Tr()}.node`,i=[];for(let c of r){let h=Lr(c),M=Te(h,"prebuilds",t,n),_=_e(M);if(_.ok)return _.value;i.push({path:M,err:_.err});let $=Te(h,o),w=_e($);if(w.ok)return w.value;i.push({path:$,err:w.err})}let s=i.map(c=>` ${c.path}: ${_r(c.err)}`).join(` | ||
| `);throw new Error(`Native addon "${e}" not found for ${t}. Tried: | ||
| ${s}`)}function Hr(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:kr(e)}}catch(r){return{ok:!1,err:r}}}function kr(e){return Tr(Ar(import.meta.url))(e)}var v,ke=Re.dirname(Rr(import.meta.url));function De(){if(v){if(v.kind==="ok")return v.addon;throw v.error}try{let e=He("cli-native",[ke,Re.resolve(ke,"..","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 Me(){if(process.platform==="win32")return De()}try{Dr.enableCompileCache?.()}catch{}var R=Mr(Br(import.meta.url)),Vr=Be.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=Me();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var $e=Se(process.argv,R);if($e)await import(k($e).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=$r(R,"voice-server.js");try{let{runVoiceServer:r}=await import(k(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{Te(process.argv.slice(2))&&we.start();let e=await Le(R,Vr);await import(k(e).href)} | ||
| ${s}`)}function _r(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 _e(e){try{return{ok:!0,value:wr(e)}}catch(r){return{ok:!1,err:r}}}function wr(e){return Er(Or(import.meta.url))(e)}var v,Ie=Re.dirname(Ar(import.meta.url));function Ne(){if(v){if(v.kind==="ok")return v.addon;throw v.error}try{let e=Ae("cli-native",[Ie,Re.resolve(Ie,"..","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: ${Se(e)}`);throw v={kind:"error",error:r},r}}function T(){if(process.platform==="win32")return Ne()}var Fe=Symbol.for("github.copilot.cli.cleanExit");function Ir(){let e=Reflect.get(process,"exit");if(typeof e!="function")return;let r=Reflect.get(e,Fe);return typeof r=="function"?r:void 0}function Rr(){let e;if(process.platform==="win32")try{e=T()}catch{e=void 0}let r=!1;return()=>{if(!r){r=!0;try{process.report.reportOnFatalError=!1}catch{}if(e){try{e.uninstallExceptionFilter()}catch{}try{e.disableCrashReporting()}catch{}}}}}function ke(){let e=Ir();if(e)return e;let r=process.exit.bind(process),t=Rr(),n=(...s)=>(t(),r(...s));process.once("exit",t);let o=!0,i=()=>{o&&(o=!1,process.exit===n&&(process.exit=r),process.removeListener("exit",t))};return Reflect.defineProperty(n,Fe,{value:i}),process.exit=n,i}import{existsSync as Nr}from"node:fs";import{basename as Fr,resolve as kr}from"node:path";var He="extension_bootstrap.mjs";function De(e,r,t=Nr){let n=e.find(s=>Fr(s)===He);if(!n)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${r}, argv-bootstrap=${n} | ||
| `);let o=kr(r,"preloads",He),i=t(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${i} | ||
| `),i)return o}var Hr=new Set(["--server","--headless","--acp","--embedded-host"]),Dr=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function Mr(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function $r(e){if(e.some(t=>Hr.has(t)||Mr(t)))return!0;let r=e.find(t=>!t.startsWith("-"));return r!==void 0&&Dr.has(r)}function Me(e){return!$r(e)}var Br="github.copilot.cli.typeahead.capture",$e=Symbol.for(Br);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}}},Be=new k;try{Vr.enableCompileCache?.()}catch{}var D=Ur(Wr(import.meta.url)),qr=Ue.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32"){try{let e=T();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}ke()}var Ve=De(process.argv,D);if(Ve)await import(H(Ve).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=jr(D,"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{Me(process.argv.slice(2))&&Be.start();let e=await Oe(D,qr);await import(H(e).href)} |
+1
-1
| { | ||
| "name": "@github/copilot-darwin-arm64", | ||
| "version": "1.0.79-3", | ||
| "version": "1.0.79-4", | ||
| "description": "GitHub Copilot CLI for darwin-arm64", | ||
@@ -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 not supported yet
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
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 7 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 6 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
184217
0.01%339983168
-0.11%281
0.36%