Lines 1-21javascript
2import{randomBytes as I}from"crypto";import Q from"fs";import w from"path";import{fileURLToPath as B}from"url";import{serve as F}from"@hono/node-server";import U,{portNumbers as z}from"get-port";import J from"open";import L from"fs/promises";import W from"path";import{serveStatic as M}from"@hono/node-server/serve-static";import{Hono as D}from"hono";import{execFile as N}from"child_process";var g=class extends Error{constructor(o,r){super(r);this.code=o}code};function d(e,s){return new Promise((o,r)=>{N(e,s,{encoding:"utf8",maxBuffer:20*1024*1024},(n,a,t)=>{if(n==null){o({stderr:t,stdout:a});ret ...
4 associatedPullRequests(states: [OPEN], first: 10) {
9 pageInfo { hasNextPage endCursor }
10 }`}function b(e,s){let o=new Map(e.openPullRequests.map(n=>[n.url,n])),r=e.openPullRequestCount??0;for(let n of s.nodes){r+=n.associatedPullRequests.totalCount;for(let a of n.associatedPullRequests.nodes)o.set(a.url,a)}e.openPullRequestCount=r,e.openPullRequests=[...o.values()],e.pullRequestStatus="loaded"}async function A(e,s){for(let r=0;r<e.length;r+=10){let n=e.slice(r,r+10),a=[],t=[],l={};n.forEach((p,c)=>{let[u,f]=p.fullName.split("/",2);a.push(`$owner${c}: String!`,`$name${c}: String!`),t.push(`r${c}: repository(owner: $owner${c}, name: $name${c}) { ${R()} }`),l[`owner${c}`]=u,l[`name ...
11`)} }`,l);n.forEach((p,c)=>{let u=i.data?.[`r${c}`];u!=null?b(p,u.refs):p.pullRequestStatus="unavailable"});for(let p=0;p<n.length;p++){let c=n[p],u=i.data?.[`r${p}`]?.refs;
12 repository(owner: $owner, name: $name) { ${R("after")} }
13 }`,{after:u.pageInfo.endCursor,name:C,owner:f})).data?.repository?.refs,u!=null&&b(c,u)}}}return e}async function x(e,s){let o=["api","graphql","-f",`query=${e}`];for(let[r,n]of Object.entries(s))o.push("-f",`${r}=${
14
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/cli.jsView on unpkg · L1 15Usage: delete-github-forks [options]
18 --port <number> Use a specific port (default: 4173, then next available)
19 --no-open Do not open the browser automatically
20 -h, --help Show this help`)}function K(e){let s=!0,o;for(let r=0;r<e.length;r++){let n=e[r];if(n==="--no-open")s=!1;else if(n==="--port"){let a=e[++r],t=Number(a);if(!Number.isInteger(t)||t<1||t>65535)throw new Error("--port must be an integer between 1 and 65535.");o=t}else if(n==="--help"||n==="-h")X(),process.exit(0);else throw new Error(`Unknown option: ${n}`)}return{openBrowser:s,port:o}}async function Y(){let e=K(process.argv.slice(2)),s=e.port??await U({host:"127.0.0.1",port:z(4173,4273)}),o=w.dirname(B(import.meta.url)),r=w.join(o,"client");if(!Q.existsSync(w.join(r,"index.html ...
21//# sourceMappingURL=cli.js.map
Long lines were clipped for display.