Lines 1-38javascript
2import{createRequire as ke}from"node:module";var Ne=Object.create;var{getPrototypeOf:Be,defineProperty:ac,getOwnPropertyNames:qe}=Object;var Ie=Object.prototype.hasOwnProperty;function Ue(i){return this[i]}var _e,je,nc=(i,a,n)=>{var c=i!=null&&typeof i==="object";if(c){var p=a?_e??=new WeakMap:je??=new WeakMap,s=p.get(i);if(s)return s}n=i!=null?Ne(Be(i)):{};let o=a||!i||!i.__esModule?ac(n,"default",{value:i,enumerable:!0}):n;for(let m of qe(i))if(!Ie.call(o,m))ac(o,m,{get:Ue.bind(i,m),enumerable:!0});if(c)p.set(i,o);return o};var X=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports);var Fe ...
4 * Copyright(c) 2014 Jonathan Ong
5 * Copyright(c) 2015 Douglas Christopher Wilson
7 */var Yn=no(),Ox=S("path").extname,co=/^\s*([^;\s]*)(?:;|\s|$)/,Px=/^text\//i;yx.charset=po;yx.charsets={lookup:po};yx.contentType=Rx;yx.extension=Ax;yx.extensions=Object.create(null);yx.lookup=Ex;yx.types=Object.create(null);
8`;_.DEFAULT_CONTENT_TYPE="application/octet-stream";_.prototype.append=function(i,a,n){if(n=n||{},typeof n==="string")n={filename:n};var c=Vc.prototype.append.bind(this);if(typeof a==="number"||a==null)a=String(a);if(Array.isArray(a)){this._error(Error("Arrays are not supported."));return}var p=this._multiPartHeader(i,a,n),s=this._multiPartFooter();c(p),c(a),c(s),this._trackLength(p,a,n)};_.prototype._trackLength=function(i,a,n){var c=0;if(n.knownLength!=null)c+=Number(n.knownLength);else if(Buffer.isBuffer(a))c=a.length;else if(typeof a==="string")c=Buffer.byteLength(a);if(this._valueLength+= ...
10`+s),i.push(p+"m+"+_n.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Zd()+a+" "+i[0]}function Zd(){if(Km.inspectOpts.hideDate)return"";return new Date().toISOString()+
11`)}function $d(i){if(i)process.env.DEBUG=i;else delete process.env.DEBUG}function Jd(){return process.env.DEBUG}function Kd(i){i.inspectOpts={};let a=Object.keys(Km.inspectOpts);for(let n=0;n<a.
12`).map((a)=>a.trim()).join(" ")};Jm.O=function(i){return this.inspectOpts.colors=this.useColors,Un.inspect(i,this.inspectOpts)}});var Ta=X(($z,Tc)=>{if(typeof process>"u"||process.type==="renderer"
13`).some((a)=>a.indexOf("(https.js:")!==-1||a.indexOf("node:https:")!==-1)}function jn(i,a){return new jn.Agent(i,a)}(function(i){class a extends jd.EventEmitter{constructor(n,c){super();let p=c;if(typeof n==="function")this.callback=n;else if(n)p=n;if(this.timeout=null,p&&typeof p.timeout==="number")this.timeout=p.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return Oc()?443:80}set defaultPort(n){this.exp ...
15`)===-1){Pa("have not received end of HTTP headers yet..."),s();return}let f=d.toString("ascii",0,d.indexOf(`\r
16`)),Z=+f.split(" ")[1];Pa("got proxy server response: %o",f),a({statusCode:Z,buffered:d})}i.on("error",l),i.on("close",m),i.on("end",u),s()})}Ra.default=Cd});var Lm=X((ca)=>{var Sd=ca&&ca.__awaiter
17`;if(n.auth)s["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`;let{host:u,port:l,secureEndpoint:e}=a;if(!Ed(l,e))u+=`:${l}`;s.Host=u,s.Connection="close";for(let Z of Object.keys(s))m+=`${Z}: ${s[Z]}\r
18`;let v=Rd.default(p);p.write(`${m}\r
19`);let{statusCode:d,buffered:t}=yield v;if(d===200){if(i.once("socket",Ad),a.secureEndpoint){Aa("Upgrading socket connection to TLS");let Z=a.servername||a.host;return jm.default.connect(Object.assign(Object.assign({},yd(a,"host","hostname","path","port")),{socket:p,servername:Z}))}return p}p.destroy();let f=new
20`).forEach(function(o){if(p=o.indexOf(":"),n=o.substring(0,p).trim().toLowerCase(),c=o.substring(p+1).trim(),!n||a[n]&&Bx[n])return;if(n==="set-cookie")if(a[n])a[n].push(c);else a[n]=[c];else a[n]=a[n]?a[n]+", "+c:c}),a};function qx(i){let a=0,n=i.length;while(a<n){let c=i.charCodeAt(a);if(c!==9&&c!==32)break;a+=1}while(n>a){let c=i.charCodeAt(n-1);if(c!==9&&c!==32)break;n-=1}return a===0&&n===i.length?i:i.slice(a,n)}var Ix=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ux=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oc(i,a){if(x.isArray(i))return i.map((n)= ...
HighChild Process
Package source references child process execution.
dist/index.jsView on unpkg · L18 HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.jsView on unpkg · L7 HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
21`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...a){let n=new this(i);return a.forEach((c)=>n.set(c)),n}static accessor(i){let n=(this[Rp]=this[Rp]={accessors:{}}).accessors,c=this.prototype;function
22`,Yt=nn.encode(sa),Wt=2;class Em{constructor(i,a){let{escapeName:n}=this.constructor,c=x.isString(a),p=`Content-Disposition: form-data; name="${n(i)}"${!c&&a.name?`; filename="${n(a.name)}"`:""}${sa}`;if(c)a=nn.encode(String(a).replace(/\r?\n|\r\n?/g,sa));else{let s=String(a.type||"application/octet-stream").replace(/[\r\n]/g,"");p+=`Content-Type: ${s}${sa}`}this.headers=nn.encode(p+sa),this.contentLength=c?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+Wt,this.name=i,this.value=a}async*encode(){yield this.headers;let{value:i}=this;if(x.isTypedArray(i))yield i;else yi ...
24`):" "+qu(o[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return p}var Cn={getAdapter:Wb,adapters:wp};function fp(i){if(i.cancelToken)i.cancelToken.throwIfRequested();if(i.signal&&i.signal.aborted)throw new bi(null,i)}function Sn(
25`);return s===-1?"":c.stack.slice(s+1)})();try{if(!n.stack)n.stack=p;else if(p){let s=p.indexOf(`
26`),o=s===-1?-1:p.indexOf(`
27`,s+1),m=o===-1?"":p.slice(o+1);if(!String(n.stack).endsWith(m))n.stack+=`
28`+p}}catch(s){}}throw n}}_request(i,a){if(typeof i==="string")a=a||{},a.url=i;else a=i||{};a=Ki(this.defaults,a);let{transitional:n,paramsSerializer:c,headers:p}=a;if(n!==void 0)pn.assertOptions(n,{silentJSONParsing:mi.transitional(mi.boolean),forcedJSONParsing:mi.transitional(mi.boolean),clarifyTimeoutError:mi.transitional(mi.boolean),legacyInterceptorReqResOrdering:mi.transitional(mi.boolean),advertiseZstdAcceptEncoding:mi.transitional(mi.boolean),validateStatusUndefinedResolves:mi.transitional(mi.boolean)},!1);if(c!=null)if(x.isFunction(c))a.paramsSerializer={serialize:c};else pn.assertOpti ...
29`,{mode:384}),await mn.chmod(i,384).catch(()=>{})}async function Cu(i){await Hu(en,i)}async function Su(i,a=process.cwd()){let n=un(a,xn);return await Hu(n,i),n}async
30`),process.exit(1)}function V(i){if(i instanceof Ui)return i.status?`${i.message} (HTTP ${i.status})`:i.message;if(i instanceof Error)return i.message;return String(i)}function C(i){process.stdout.write(JSON.stringify(i,null,2)+`
31`)}import{promises as ru}from"node:fs";import{join as $b}from"node:path";var ma=".mcp.json",Pn={command:"figura",args:["mcp"]};function Jb(i){if(!i||typeof i!=="object")return!1;let a=i;return a.command===Pn.command&&Array.isArray(a.args)&&a.args.length===Pn.args.length&&a.args.every((n,c)=>n===Pn.args[c])}async function Tu(i=process.cwd()){let a=$b(i,ma),n={},c=!1;try{let m=await ru.readFile(a,"utf8");c=!0;let u=JSON.parse(m);if(!u||typeof u!=="object"||Array.isArray(u))return{status:"unparsable",path:a};n=u}catch(m){if(c)return{status:"unparsable",path:a};if(m.code!=="ENOENT")return{status:" ...
32`),{status:s,path:a}}import{promises as $p}from"node:fs";import{join as Kb}from"node:path";function Ou(i){return i.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function Pu
33`),"created";if(p.split(`
34`).map((m)=>m.trim()).filter((m)=>m&&!m.startsWith("#")).some((m)=>Ou(m)===c))return"present";let o=p.endsWith(`
36`;return await $p.writeFile(n,p+o+i+`
37`),"added"}import{existsSync as ln,mkdirSync as Vb,readdirSync as Jp,readFileSync as Mb,writeFileSync as Nb,copyFileSync as Bb,rmSync as qb}from"node:fs";import{homedir as Ru}from"node:os";import{fileURLToPath as Au}from"node:url";import{dirname as Ib,join as oi}from"node:path";import{readFileSync as
Long lines were clipped for display.