@spfunctions/cli 2.0.15 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/12.index.js +1 -1
- package/dist/160.index.js +1 -1
- package/dist/174.index.js +1 -1
- package/dist/582.index.js +1 -1
- package/dist/641.index.js +1 -1
- package/dist/669.index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/278.index.js +0 -6
- package/dist/830.index.js +0 -1
package/dist/669.index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=669,exports.ids=[669],exports.modules={15183:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&r(e,t,o);return n(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;const i=s(o(58611)),c=s(o(65692));async function u(t){let e=0;const o=[];for await(const r of t)e+=r.length,o.push(r);return Buffer.concat(o,e)}e.toBuffer=u,e.json=async function(t){const e=(await u(t)).toString("utf8");try{return JSON.parse(e)}catch(t){const o=t;throw o.message+=` (input: ${e})`,o}},e.req=function(t,e={}){const o=(("string"==typeof t?t:t.href).startsWith("https:")?c:i).request(t,e),r=new Promise((t,e)=>{o.once("response",t).once("error",e).end()});return o.then=r.then.bind(r),o}},98894:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&r(e,t,o);return n(e,t),e},i=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;const c=s(o(69278)),u=s(o(58611)),a=o(65692);i(o(15183),e);const p=Symbol("AgentBaseInternalState");class f extends u.Agent{constructor(t){super(t),this[p]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some(t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:"))}incrementSockets(t){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[t]||(this.sockets[t]=[]);const e=new c.Socket({writable:!1});return this.sockets[t].push(e),this.totalSocketCount++,e}decrementSockets(t,e){if(!this.sockets[t]||null===e)return;const o=this.sockets[t],r=o.indexOf(e);-1!==r&&(o.splice(r,1),this.totalSocketCount--,0===o.length&&delete this.sockets[t])}getName(t){return this.isSecureEndpoint(t)?a.Agent.prototype.getName.call(this,t):super.getName(t)}createSocket(t,e,o){const r={...e,secureEndpoint:this.isSecureEndpoint(e)},n=this.getName(r),s=this.incrementSockets(n);Promise.resolve().then(()=>this.connect(t,r)).then(i=>{if(this.decrementSockets(n,s),i instanceof u.Agent)try{return i.addRequest(t,r)}catch(t){return o(t)}this[p].currentSocket=i,super.createSocket(t,e,o)},t=>{this.decrementSockets(n,s),o(t)})}createConnection(){const t=this[p].currentSocket;if(this[p].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[p].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[p]&&(this[p].defaultPort=t)}get protocol(){return this[p].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[p]&&(this[p].protocol=t)}}e.Agent=f},3669:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&r(e,t,o);return n(e,t),e},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;const c=s(o(69278)),u=s(o(64756)),a=i(o(42613)),p=i(o(2830)),f=o(98894),h=o(87016),l=o(37943),d=(0,p.default)("https-proxy-agent"),y=t=>void 0===t.servername&&t.host&&!c.isIP(t.host)?{...t,servername:t.host}:t;class g extends f.Agent{constructor(t,e){super(e),this.options={path:void 0},this.proxy="string"==typeof t?new h.URL(t):t,this.proxyHeaders=e?.headers??{},d("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?b(e,"headers"):null,host:o,port:r}}async connect(t,e){const{proxy:o}=this;if(!e.host)throw new TypeError('No "host" provided');let r;"https:"===o.protocol?(d("Creating `tls.Socket`: %o",this.connectOpts),r=u.connect(y(this.connectOpts))):(d("Creating `net.Socket`: %o",this.connectOpts),r=c.connect(this.connectOpts));const n="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=c.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${s}:${e.port} HTTP/1.1\r\n`;if(o.username||o.password){const t=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;n["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}n.Host=`${s}:${e.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(n))i+=`${t}: ${n[t]}\r\n`;const p=(0,l.parseProxyResponse)(r);r.write(`${i}\r\n`);const{connect:f,buffered:h}=await p;if(t.emit("proxyConnect",f),this.emit("proxyConnect",f,t),200===f.statusCode)return t.once("socket",v),e.secureEndpoint?(d("Upgrading socket connection to TLS"),u.connect({...b(y(e),"host","path","port"),socket:r})):r;r.destroy();const g=new c.Socket({writable:!1});return g.readable=!0,t.once("socket",t=>{d("Replaying proxy buffer for failed request"),(0,a.default)(t.listenerCount("data")>0),t.push(h),t.push(null)}),g}}function v(t){t.resume()}function b(t,...e){const o={};let r;for(r in t)e.includes(r)||(o[r]=t[r]);return o}g.protocols=["http","https"],e.HttpsProxyAgent=g},37943:function(t,e,o){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;const n=(0,r(o(2830)).default)("https-proxy-agent:parse-proxy-response");e.parseProxyResponse=function(t){return new Promise((e,o)=>{let r=0;const s=[];function i(){const u=t.read();u?function(u){s.push(u),r+=u.length;const a=Buffer.concat(s,r),p=a.indexOf("\r\n\r\n");if(-1===p)return n("have not received end of HTTP headers yet..."),void i();const f=a.slice(0,p).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),o(new Error("No header received from proxy CONNECT response"));const l=h.split(" "),d=+l[1],y=l.slice(2).join(" "),g={};for(const e of f){if(!e)continue;const r=e.indexOf(":");if(-1===r)return t.destroy(),o(new Error(`Invalid header from proxy CONNECT response: "${e}"`));const n=e.slice(0,r).toLowerCase(),s=e.slice(r+1).trimStart(),i=g[n];"string"==typeof i?g[n]=[i,s]:Array.isArray(i)?i.push(s):g[n]=s}n("got proxy server response: %o %o",h,g),c(),e({connect:{statusCode:d,statusText:y,headers:g},buffered:a})}(u):t.once("readable",i)}function c(){t.removeListener("end",u),t.removeListener("error",a),t.removeListener("readable",i)}function u(){c(),n("onend"),o(new Error("Proxy connection ended before receiving CONNECT response"))}function a(t){c(),n("onerror %o",t),o(t)}t.on("error",a),t.on("end",u),i()})}}};
|
|
1
|
+
exports.id=669,exports.ids=[669],exports.modules={15183:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.json=t.toBuffer=void 0;const i=s(r(58611)),c=s(r(65692));async function a(e){let t=0;const r=[];for await(const n of e)t+=n.length,r.push(n);return Buffer.concat(r,t)}t.toBuffer=a,t.json=async function(e){const t=(await a(e)).toString("utf8");try{return JSON.parse(t)}catch(e){const r=e;throw r.message+=` (input: ${t})`,r}},t.req=function(e,t={}){const r=(("string"==typeof e?e:e.href).startsWith("https:")?c:i).request(e,t),n=new Promise((e,t)=>{r.once("response",e).once("error",t).end()});return r.then=n.then.bind(n),r}},98894:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Agent=void 0;const c=s(r(69278)),a=s(r(58611)),u=r(65692);i(r(15183),t);const l=Symbol("AgentBaseInternalState");class p extends a.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if("boolean"==typeof e.secureEndpoint)return e.secureEndpoint;if("string"==typeof e.protocol)return"https:"===e.protocol}const{stack:t}=new Error;return"string"==typeof t&&t.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);const t=new c.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||null===t)return;const r=this.sockets[e],n=r.indexOf(t);-1!==n&&(r.splice(n,1),this.totalSocketCount--,0===r.length&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?u.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){const n={...t,secureEndpoint:this.isSecureEndpoint(t)},o=this.getName(n),s=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,n)).then(i=>{if(this.decrementSockets(o,s),i instanceof a.Agent)try{return i.addRequest(e,n)}catch(e){return r(e)}this[l].currentSocket=i,super.createSocket(e,t,r)},e=>{this.decrementSockets(o,s),r(e)})}createConnection(){const e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[l]&&(this[l].protocol=e)}}t.Agent=p},6110:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(40897)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},40897:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,i=null;function c(...e){if(!c.enabled)return;const n=c,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";i++;const s=t.formatters[o];if("function"==typeof s){const t=e[i];r=s.call(n,t),e.splice(i,1),i--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=n,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{i=e}}),"function"==typeof t.init&&t.init(c),c}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,s=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,s++,r=s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(70744),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},2830:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(6110):e.exports=r(95108)},95108:(e,t,r)=>{const n=r(52018),o=r(39023);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(o.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),s=` ${o};1m${n} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(2428);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),e.exports=r(40897)(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},3669:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpsProxyAgent=void 0;const c=s(r(69278)),a=s(r(64756)),u=i(r(42613)),l=i(r(2830)),p=r(98894),f=r(87016),d=r(37943),h=(0,l.default)("https-proxy-agent"),C=e=>void 0===e.servername&&e.host&&!c.isIP(e.host)?{...e,servername:e.host}:e;class m extends p.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy="string"==typeof e?new f.URL(e):e,this.proxyHeaders=t?.headers??{},h("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?y(t,"headers"):null,host:r,port:n}}async connect(e,t){const{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let n;"https:"===r.protocol?(h("Creating `tls.Socket`: %o",this.connectOpts),n=a.connect(C(this.connectOpts))):(h("Creating `net.Socket`: %o",this.connectOpts),n=c.connect(this.connectOpts));const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=c.isIPv6(t.host)?`[${t.host}]`:t.host;let i=`CONNECT ${s}:${t.port} HTTP/1.1\r\n`;if(r.username||r.password){const e=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(e).toString("base64")}`}o.Host=`${s}:${t.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const e of Object.keys(o))i+=`${e}: ${o[e]}\r\n`;const l=(0,d.parseProxyResponse)(n);n.write(`${i}\r\n`);const{connect:p,buffered:f}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),200===p.statusCode)return e.once("socket",g),t.secureEndpoint?(h("Upgrading socket connection to TLS"),a.connect({...y(C(t),"host","path","port"),socket:n})):n;n.destroy();const m=new c.Socket({writable:!1});return m.readable=!0,e.once("socket",e=>{h("Replaying proxy buffer for failed request"),(0,u.default)(e.listenerCount("data")>0),e.push(f),e.push(null)}),m}}function g(e){e.resume()}function y(e,...t){const r={};let n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}m.protocols=["http","https"],t.HttpsProxyAgent=m},37943:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseProxyResponse=void 0;const o=(0,n(r(2830)).default)("https-proxy-agent:parse-proxy-response");t.parseProxyResponse=function(e){return new Promise((t,r)=>{let n=0;const s=[];function i(){const a=e.read();a?function(a){s.push(a),n+=a.length;const u=Buffer.concat(s,n),l=u.indexOf("\r\n\r\n");if(-1===l)return o("have not received end of HTTP headers yet..."),void i();const p=u.slice(0,l).toString("ascii").split("\r\n"),f=p.shift();if(!f)return e.destroy(),r(new Error("No header received from proxy CONNECT response"));const d=f.split(" "),h=+d[1],C=d.slice(2).join(" "),m={};for(const t of p){if(!t)continue;const n=t.indexOf(":");if(-1===n)return e.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${t}"`));const o=t.slice(0,n).toLowerCase(),s=t.slice(n+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}o("got proxy server response: %o %o",f,m),c(),t({connect:{statusCode:h,statusText:C,headers:m},buffered:u})}(a):e.once("readable",i)}function c(){e.removeListener("end",a),e.removeListener("error",u),e.removeListener("readable",i)}function a(){c(),o("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function u(e){c(),o("onerror %o",e),r(e)}e.on("error",u),e.on("end",a),i()})}},70744:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o,i=365.25*o;function c(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var s=Math.abs(e);if(s>=o)return c(e,s,o,"day");if(s>=n)return c(e,s,n,"hour");if(s>=r)return c(e,s,r,"minute");if(s>=t)return c(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=o)return Math.round(e/o)+"d";if(s>=n)return Math.round(e/n)+"h";if(s>=r)return Math.round(e/r)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},19803:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},2428:(e,t,r)=>{"use strict";const n=r(70857),o=r(52018),s=r(19803),{env:i}=process;let c;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===c)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===c)return 0;const r=c||0;if("dumb"===i.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||"codeship"===i.CI_NAME?1:r;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:r}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?c=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(c=1),"FORCE_COLOR"in i&&(c="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return a(u(e,e&&e.isTTY))},stdout:a(u(!0,o.isatty(1))),stderr:a(u(!0,o.isatty(2)))}}};
|