Lines 1-38javascript
2import{createRequire as Su}from"node:module";var Iu=Object.create;var{getPrototypeOf:Uu,defineProperty:ac,getOwnPropertyNames:_u}=Object;var Fu=Object.prototype.hasOwnProperty;function ju(i){return this[i]}var Lu,Du,nc=(i,a,n)=>{var c=i!=null&&typeof i==="object";if(c){var p=a?Lu??=new WeakMap:Du??=new WeakMap,s=p.get(i);if(s)return s}n=i!=null?Iu(Uu(i)):{};let o=a||!i||!i.__esModule?ac(n,"default",{value:i,enumerable:!0}):n;for(let m of _u(i))if(!Fu.call(o,m))ac(o,m,{get:ju.bind(i,m),enumerable:!0});if(c)p.set(i,o);return o};var $=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports);var Hu ...
4 * Copyright(c) 2014 Jonathan Ong
5 * Copyright(c) 2015 Douglas Christopher Wilson
7 */var Wn=ss(),Ee=S("path").extname,os=/^\s*([^;\s]*)(?:;|\s|$)/,he=/^text\//i;al.charset=ms;al.charsets={lookup:ms};al.contentType=ye;al.extension=re;al.extensions=Object.create(null);al.lookup=ge;al.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+"+Fn.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Jd()+a+" "+i[0]}function Jd(){if(Mm.inspectOpts.hideDate)return"";return new Date().toISOString()+
11`)}function Gd(i){if(i)process.env.DEBUG=i;else delete process.env.DEBUG}function Vd(){return process.env.DEBUG}function Md(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,_n.inspect(i,this.inspectOpts)}});var Ra=$((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 Dd.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..."),s();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),s()})}ha.default=Pd});var Tm=$((pa)=>{var Cd=pa
17`;if(n.auth)s["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`;let{host:x,port:l,secureEndpoint:u}=a;if(!gd(l,u))x+=`:${l}`;s.Host=x,s.Connection="close";for(let W of Object.keys(s))m+=`${W}: ${s[W]}\r
18`;let v=yd.default(p);p.write(`${m}\r
19`);let{statusCode:d,buffered:b}=yield v;if(d===200){if(i.once("socket",rd),a.secureEndpoint){ya("Upgrading socket connection to TLS");let W=a.servername||a.host;return Dm.default.connect(Object.assign(Object.assign({},ab(a,"host","hostname","path","port")),{socket:p,servername:W}))}return p}p.destroy();let Q
20`).forEach(function(o){if(p=o.indexOf(":"),n=o.substring(0,p).trim().toLowerCase(),c=o.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 _e(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 Fe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),je=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sc(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[yp]=this[yp]={accessors:{}}).accessors,c=this.prototype;function
22`,Xb=pn.encode(ma),$b=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 s=String(a.type||"application/octet-stream").replace(/[\r\n]/g,"");p+=`Content-Type: ${s}${ma}`}this.headers=pn.encode(p+ma),this.contentLength=c?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+$b,this.name=i,this.value=a}async*encode(){yield this.headers;let{value:i}=this;if(e.isTypedArray(i))yield i;else yi ...
24`):" "+_x(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 Sn={getAdapter:$t,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 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)on.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 on.assertOpti ...
29`,{mode:384}),await un.chmod(i,384).catch(()=>{})}async function Cx(i){await Px(Gi,i)}async function Rx(i,a=process.cwd()){let n=xa(a,ln);return await Px(n,i),n}async
30`);let p=It(n.tokenSource,{mutate:a.mutate,inRepo:Jp(),allowGlobal:K(i,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),s=n.team?`'${n.team}'`:"the global config team";if(p==="refuse")J(`this repo isn't linked to a Figura team, so this would land on ${s} — the
31`+` global credential's team, not necessarily this project's. Run \`figura link\` to
32 bind this repo to its own team, or pass --allow-global to use ${s} anyway.`);if(p==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${s}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return n}function J(i){process.stderr.write(`figura: ${i}
33`),process.exit(1)}function M(i){if(i instanceof _i)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 _t(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 hx(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:s,path:a}}import{promises as Kp}from"node:fs";import{join as Ft}from"node:path";function yx(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,o),"created";if(m.split(`
Long lines were clipped for display.