@github/copilot
Advanced tools
+2
-2
@@ -7,3 +7,3 @@ #!/usr/bin/env node | ||
| import{spawn as B}from"node:child_process";import{readFileSync as V,rmSync as A}from"node:fs";import{basename as R,dirname as X,join as f,resolve as w,sep as J}from"node:path";import{fileURLToPath as D,pathToFileURL as O}from"node:url";import{readdir as N,access as j,constants as F}from"node:fs/promises";import{join as i,basename as v}from"node:path";import{homedir as a,platform as _}from"node:os";function x(){if(process.argv.includes("--no-auto-update"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function Q(){if(_()==="darwin")return i(a(),"Library","Caches","copilot");if(_()==="win32"){let r=process.env.LOCALAPPDATA||i(a(),".cache");return i(r,"copilot")}let e=process.env.XDG_CACHE_HOME||i(a(),".cache");return i(e,"copilot")}function C(){let e=[];process.env.COPILOT_CACHE_HOME&&e.push(i(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(i(Q(),"pkg"));let r=process.env.XDG_CACHE_HOME||i(a(),".cache");return e.push(i(r,"copilot","pkg")),process.env.COPILOT_HOME&&e.push(i(process.env.COPILOT_HOME,"pkg")),e.push(i(a(),".copilot","pkg")),[...new Set(e)]}function E(e){let r=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(r)return[Number(r[1]),Number(r[2]),Number(r[3])]}function W(e,r){let n=E(e),s=E(r);if(!n&&!s)return 0;if(!n)return-1;if(!s)return 1;for(let o=0;o<3;o++)if(n[o]!==s[o])return n[o]-s[o];let c=e.includes("-"),t=r.includes("-");return c!==t?c?-1:1:e.localeCompare(r)}async function b(e,...r){let n=[];for(let s of r){let c;try{c=await N(s)}catch{continue}for(let t of c){let o=i(s,t);try{await j(i(o,e),F.R_OK),n.push(o)}catch{continue}}}return n.sort((s,c)=>{let t=W(v(c),v(s));return t!==0?t:s.localeCompare(c)}),n}var $=75;function T(){if(process.stdout.isTTY)try{process.stdout.write("\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l\x1B[<u")}catch{}}var M=X(D(import.meta.url)),G=process.execPath.endsWith("copilot")||process.execPath.endsWith("copilot.exe");process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;var d=process.argv.find(e=>R(e).startsWith("conpty_console_list_agent")),H=process.argv.find(e=>R(e)==="extension_bootstrap.mjs"),L=H?w(H):void 0,U=L?.startsWith(w(M,"preloads")+J)?L:void 0;if(d){let e=d.endsWith(".js")?d:d+".js";await import(O(e).href)}else if(U)await import(O(U).href);else if(process.env.COPILOT_RUN_APP==="1"){let e=f(M,"app.js");if(G&&x()){let r=C().map(s=>f(s,"universal")),n=await b("app.js",...r);n.length>0&&(e=f(n[0],"app.js"))}await import(O(e).href)}else{let r=function(){let t=process.env.COPILOT_HOME||f(process.env.HOME||process.env.USERPROFILE||"",".copilot");return f(t,"restart",`${e}.json`)},n=function(){let t=r();try{let o=V(t,"utf-8");return A(t,{force:!0}),JSON.parse(o)}catch{return}},s=function(){try{A(r(),{force:!0})}catch{}},c=function(t,o){let k=G?t:[...process.execArgv,D(import.meta.url),...t],m=B(process.execPath,k,{stdio:"inherit",cwd:o,env:{...process.env,COPILOT_RUN_APP:"1",COPILOT_LOADER_PID:e}}),u=p=>{try{m.kill(p)}catch{}},g=()=>u("SIGINT"),I=()=>u("SIGTERM"),h=()=>u("SIGHUP"),P=()=>u("SIGQUIT");process.on("SIGINT",g),process.on("SIGTERM",I),process.on("SIGHUP",h),process.on("SIGQUIT",P),m.on("error",p=>{process.off("SIGINT",g),process.off("SIGTERM",I),process.off("SIGHUP",h),process.off("SIGQUIT",P),T(),s(),process.stderr.write(`Failed to start: ${p.message} | ||
| `),process.exit(1)}),m.on("exit",(p,S)=>{if(process.off("SIGINT",g),process.off("SIGTERM",I),process.off("SIGHUP",h),process.off("SIGQUIT",P),p===$){let l=n();if(l){let y=[...l.argv,"--resume",l.sessionId];c(y,l.cwd||o)}else c(t,o);return}s(),S?(T(),process.kill(process.pid,S)):p!==0?(T(),process.exit(p??1)):process.exit(0)})};K=r,Y=n,q=s,z=c;let e=String(process.pid);c(process.argv.slice(2),process.cwd())}var K,Y,q,z; | ||
| import{spawn as V}from"node:child_process";import{readFileSync as K,rmSync as R}from"node:fs";import{basename as U,dirname as X,join as p,resolve as j,sep as Y}from"node:path";import{fileURLToPath as M,pathToFileURL as P}from"node:url";var k=new Set;function T(r,i){let s=Object.create(null);if(r)for(let[o,e]of Object.entries(r))s[o]=e;let n=i??k;return new Proxy(process.env,{get(o,e){if(typeof e=="string"){if(Object.hasOwn(s,e))return s[e];if(!n.has(e))return process.env[e]}},set(o,e,t){return s[e]=t,!0},has(o,e){return typeof e!="string"?!1:Object.hasOwn(s,e)?s[e]!==void 0:n.has(e)?!1:e in process.env},ownKeys(o){let e=new Set(Object.keys(process.env));for(let t of n)e.delete(t);for(let t of Object.keys(s))s[t]!==void 0?e.add(t):e.delete(t);return[...e]},getOwnPropertyDescriptor(o,e){if(typeof e!="string")return;let t;if(Object.hasOwn(s,e))t=s[e];else{if(n.has(e))return;t=process.env[e]}if(t!==void 0)return{value:t,writable:!0,enumerable:!0,configurable:!0}},deleteProperty(o,e){return s[e]=void 0,!0}})}import{readdir as F,access as Q,constants as W}from"node:fs/promises";import{join as c,basename as _}from"node:path";import{homedir as d}from"node:os";var E=process.env.XDG_CACHE_HOME||c(d(),".cache");function x(){if(process.argv.includes("--no-auto-update"))return!1;let r=process.env.COPILOT_AUTO_UPDATE;return!(r&&r.toLowerCase()==="false")}function B(){if(process.platform==="darwin")return c(d(),"Library","Caches","copilot");if(process.platform==="win32"){let r=process.env.LOCALAPPDATA||c(d(),".cache");return c(r,"copilot")}return c(E,"copilot")}function w(){let r=[];return process.env.COPILOT_CACHE_HOME&&r.push(c(process.env.COPILOT_CACHE_HOME,"pkg")),r.push(c(B(),"pkg")),r.push(c(E,"copilot","pkg")),process.env.COPILOT_HOME&&r.push(c(process.env.COPILOT_HOME,"pkg")),r.push(c(d(),".copilot","pkg")),[...new Set(r)]}function b(r){let i=r.match(/^(\d+)\.(\d+)\.(\d+)/);if(i)return[Number(i[1]),Number(i[2]),Number(i[3])]}function J(r,i){let s=b(r),n=b(i);if(!s&&!n)return 0;if(!s)return-1;if(!n)return 1;for(let t=0;t<3;t++)if(s[t]!==n[t])return s[t]-n[t];let o=r.includes("-"),e=i.includes("-");return o!==e?o?-1:1:r.localeCompare(i)}async function C(r,...i){let s=[];for(let n of i){let o;try{o=await F(n)}catch{continue}for(let e of o){let t=c(n,e);try{await Q(c(t,r),W.R_OK),s.push(t)}catch{continue}}}return s.sort((n,o)=>{let e=J(_(o),_(n));return e!==0?e:n.localeCompare(o)}),s}var $=75;function v(){if(process.stdout.isTTY)try{process.stdout.write("\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l\x1B[<u")}catch{}}var D=X(M(import.meta.url)),A=process.execPath.endsWith("copilot")||process.execPath.endsWith("copilot.exe");process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;var l=process.argv.find(r=>U(r).startsWith("conpty_console_list_agent")),G=process.argv.find(r=>U(r)==="extension_bootstrap.mjs"),H=G?j(G):void 0,L=H?.startsWith(j(D,"preloads")+Y)?H:void 0;if(l){let r=l.endsWith(".js")?l:l+".js";await import(P(r).href)}else if(L)await import(P(L).href);else if(process.env.COPILOT_RUN_APP==="1"){let r=p(D,"app.js");if(A&&x()){let i=w().map(n=>p(n,"universal")),s=await C("app.js",...i);s.length>0&&(r=p(s[0],"app.js"))}await import(P(r).href)}else{let i=function(){let e=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot");return p(e,"restart",`${r}.json`)},s=function(){let e=i();try{let t=K(e,"utf-8");return R(e,{force:!0}),JSON.parse(t)}catch{return}},n=function(){try{R(i(),{force:!0})}catch{}},o=function(e,t){let N=A?e:[...process.execArgv,M(import.meta.url),...e],g=V(process.execPath,N,{stdio:"inherit",cwd:t,env:T({COPILOT_RUN_APP:"1",COPILOT_LOADER_PID:r})}),f=a=>{try{g.kill(a)}catch{}},m=()=>f("SIGINT"),h=()=>f("SIGTERM"),I=()=>f("SIGHUP"),O=()=>f("SIGQUIT");process.on("SIGINT",m),process.on("SIGTERM",h),process.on("SIGHUP",I),process.on("SIGQUIT",O),g.on("error",a=>{process.off("SIGINT",m),process.off("SIGTERM",h),process.off("SIGHUP",I),process.off("SIGQUIT",O),v(),n(),process.stderr.write(`Failed to start: ${a.message} | ||
| `),process.exit(1)}),g.on("exit",(a,S)=>{if(process.off("SIGINT",m),process.off("SIGTERM",h),process.off("SIGHUP",I),process.off("SIGQUIT",O),a===$){let u=s();if(u){let y=[...u.argv,"--resume",u.sessionId];o(y,u.cwd||t)}else o(e,t);return}n(),S?(v(),process.kill(process.pid,S)):a!==0?(v(),process.exit(a??1)):process.exit(0)})};q=i,z=s,Z=n,ee=o;let r=String(process.pid);o(process.argv.slice(2),process.cwd())}var q,z,Z,ee; |
+8
-8
| { | ||
| "name": "@github/copilot", | ||
| "description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.", | ||
| "version": "1.0.6-1", | ||
| "version": "1.0.6-2", | ||
| "license": "SEE LICENSE IN LICENSE.md", | ||
@@ -64,12 +64,12 @@ "type": "module", | ||
| "buildMetadata": { | ||
| "gitCommit": "1ed6f6f" | ||
| "gitCommit": "65bff9e" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@github/copilot-linux-x64": "1.0.6-1", | ||
| "@github/copilot-linux-arm64": "1.0.6-1", | ||
| "@github/copilot-darwin-x64": "1.0.6-1", | ||
| "@github/copilot-darwin-arm64": "1.0.6-1", | ||
| "@github/copilot-win32-x64": "1.0.6-1", | ||
| "@github/copilot-win32-arm64": "1.0.6-1" | ||
| "@github/copilot-linux-x64": "1.0.6-2", | ||
| "@github/copilot-linux-arm64": "1.0.6-2", | ||
| "@github/copilot-darwin-x64": "1.0.6-2", | ||
| "@github/copilot-darwin-arm64": "1.0.6-2", | ||
| "@github/copilot-win32-x64": "1.0.6-2", | ||
| "@github/copilot-win32-arm64": "1.0.6-2" | ||
| } | ||
| } |
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 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.
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.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
132712936
064455
041
7.89%