Lines 1-38javascript
2import{createRequire as Ou}from"node:module";var _u=Object.create;var{getPrototypeOf:Uu,defineProperty:ac,getOwnPropertyNames:Fu}=Object;var ju=Object.prototype.hasOwnProperty;function Lu(i){return this[i]}var Du,Hu,nc=(i,a,n)=>{var c=i!=null&&typeof i==="object";if(c){var p=a?Du??=new WeakMap:Hu??=new WeakMap,o=p.get(i);if(o)return o}n=i!=null?_u(Uu(i)):{};let s=a||!i||!i.__esModule?ac(n,"default",{value:i,enumerable:!0}):n;for(let m of Fu(i))if(!ju.call(s,m))ac(s,m,{get:Lu.bind(i,m),enumerable:!0});if(c)p.set(i,s);return s};var J=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports);var Tu ...
4 * Copyright(c) 2014 Jonathan Ong
5 * Copyright(c) 2015 Douglas Christopher Wilson
7 */var Wn=oo(),ye=S("path").extname,so=/^\s*([^;\s]*)(?:;|\s|$)/,he=/^text\//i;nl.charset=mo;nl.charsets={lookup:mo};nl.contentType=re;nl.extension=ge;nl.extensions=Object.create(null);nl.lookup=il;nl.types=Object.create(null);
8`;U.DEFAULT_CONTENT_TYPE="application/octet-stream";U.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),o=this._multiPartFooter();c(p),c(a),c(o),this._trackLength(p,a,n)};U.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`+o),i.push(p+"m+"+Fn.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Kd()+a+" "+i[0]}function Kd(){if(Mm.inspectOpts.hideDate)return"";return new Date().toISOString()+
11`)}function Vd(i){if(i)process.env.DEBUG=i;else delete process.env.DEBUG}function Md(){return process.env.DEBUG}function Nd(i){i.inspectOpts={};let a=Object.keys(Mm.inspectOpts);for(let n=0;n<a.
12`).map((a)=>a.trim()).join(" ")};Vm.O=function(i){return this.inspectOpts.colors=this.useColors,Un.inspect(i,this.inspectOpts)}});var Ra=J((Bz,Pc)=>{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 Hd.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 Cc()?443:80}set defaultPort(n){this.exp ...
15`)===-1){Ea("have not received end of HTTP headers yet..."),o();return}let Q=d.toString("ascii",0,d.indexOf(`\r
16`)),W=+Q.split(" ")[1];Ea("got proxy server response: %o",Q),a({statusCode:W,buffered:d})}i.on("error",l),i.on("close",m),i.on("end",x),o()})}ya.default=Cd});var Tm=J((pa)=>{var Rd=pa
17`;if(n.auth)o["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`;let{host:x,port:l,secureEndpoint:u}=a;if(!ib(l,u))x+=`:${l}`;o.Host=x,o.Connection="close";for(let W of Object.keys(o))m+=`${W}: ${o[W]}\r
18`;let v=rd.default(p);p.write(`${m}\r
19`);let{statusCode:d,buffered:b}=yield v;if(d===200){if(i.once("socket",gd),a.secureEndpoint){ha("Upgrading socket connection to TLS");let W=a.servername||a.host;return Dm.default.connect(Object.assign(Object.assign({},nb(a,"host","hostname","path","port")),{socket:p,servername:W}))}return p}p.destroy();let Q
20`).forEach(function(s){if(p=s.indexOf(":"),n=s.substring(0,p).trim().toLowerCase(),c=s.substring(p+1).trim(),!n||a[n]&&Ue[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 Fe(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 je=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Le=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oc(i,a){if(e.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[hp]=this[hp]={accessors:{}}).accessors,c=this.prototype;function
22`,fb=pn.encode(ma),Jb=2;class gm{constructor(i,a){let{escapeName:n}=this.constructor,c=e.isString(a),p=`Content-Disposition: form-data; name="${n(i)}"${!c&&a.name?`; filename="${n(a.name)}"`:""}${ma}`;if(c)a=pn.encode(String(a).replace(/\r?\n|\r\n?/g,ma));else{let o=String(a.type||"application/octet-stream").replace(/[\r\n]/g,"");p+=`Content-Type: ${o}${ma}`}this.headers=pn.encode(p+ma),this.contentLength=c?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+Jb,this.name=i,this.value=a}async*encode(){yield this.headers;let{value:i}=this;if(e.isTypedArray(i))yield i;else yi ...
24`):" "+Ux(s[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return p}var Sn={getAdapter:Jt,adapters:wp};function Qp(i){if(i.cancelToken)i.cancelToken.throwIfRequested();if(i.signal&&i.signal.aborted)throw new ti(null,i)}function On(
25`);return o===-1?"":c.stack.slice(o+1)})();try{if(!n.stack)n.stack=p;else if(p){let o=p.indexOf(`
26`),s=o===-1?-1:p.indexOf(`
27`,o+1),m=s===-1?"":p.slice(s+1);if(!String(n.stack).endsWith(m))n.stack+=`
28`+p}}catch(o){}}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)sn.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(e.isFunction(c))a.paramsSerializer={serialize:c};else sn.assertOpti ...
29`,{mode:384}),await un.chmod(i,384).catch(()=>{})}async function Px(i){await Ox(Gi,i)}async function Cx(i,a=process.cwd()){let n=xa(a,ln);return await Ox(n,i),n}async
30`);let p=_t(n.tokenSource,{mutate:a.mutate,allowGlobal:K(i,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),o=n.team?`'${n.team}'`:"the global config team";if(p==="refuse")f(`this directory isn't linked to a Figura team, so this would land on ${o} — the
31`+` global credential's team, not necessarily this project's. Run \`figura link\` to
32 bind it to its own team, or pass --allow-global to use ${o} anyway.`);if(p==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${o}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return n}function f(i){process.stderr.write(`figura: ${i}
33`),process.exit(1)}function M(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 k(i){process.stdout.write(JSON.stringify(i,null,2)+`
34`)}import{promises as Ex}from"node:fs";import{join as Ut}from"node:path";var ua=".mcp.json",Rn={command:"figura",args:["mcp"]};function Ft(i){if(!i||typeof i!=="object")return!1;let a=i;return a.command===Rn.command&&Array.isArray(a.args)&&a.args.length===Rn.args.length&&a.args.every((n,c)=>n===Rn.args[c])}async function yx(i=process.cwd()){let a=Ut(i,ua),n={},c=!1;try{let m=await Ex.readFile(a,"utf8");c=!0;let x=JSON.parse(m);if(!x||typeof x!=="object"||Array.isArray(x))return{status:"unparsable",path:a};n=x}catch(m){if(c)return{status:"unparsable",path:a};if(m.code!=="ENOENT")return{status:" ...
35`),{status:o,path:a}}import{promises as Kp}from"node:fs";import{join as jt}from"node:path";function hx(i){return i.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function rx(i
38`,m=null;try{m=await Kp.readFile(c,"utf8")}catch{m=null}if(m===null)return await Kp.writeFile(c,s),"created";if(m.split(`
Long lines were clipped for display.