next-font 1.1.2 → 1.1.3
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/LICENSE +11 -0
- package/dist/google/get-proxy-agent.js +2 -2
- package/manifest/index.d.ts +8 -4
- package/package.json +5 -2
- package/dist/local/fontkit-DX1wsFnK.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, kijv
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"assert";import t from"events";import r from"net";import o from"os";import n from"tty";import s from"util";import i from"node:url";import a from"node:path";import l from"tls";import u from"url";function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,f,d,h={exports:{}},m={exports:{}};let C=i.fileURLToPath(import.meta.url),g=a.dirname(C);function y(){if(p)return m.exports;p=1;var e={237:(e,t,r)=>{t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},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;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let o=0,n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(o++,"%c"===e&&(n=o))}),t.splice(n,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")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),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"],e.exports=r(573)(t);let{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},573:(e,t,r)=>{e.exports=function(e){function t(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){let r;function i(...e){if(!i.enabled)return;let t=Number(new Date);i.diff=t-(r||t),i.prev=r,i.curr=t,r=t,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let n=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if("%%"===t)return t;n++;let s=o.formatters[r];if("function"==typeof s){let r=e[n];t=s.call(i,r),e.splice(n,1),n--}return t}),o.formatArgs.call(i,e),(i.log||o.log).apply(i,e)}return i.namespace=e,i.enabled=o.enabled(e),i.useColors=o.useColors(),i.color=t(e),i.destroy=n,i.extend=s,"function"==typeof o.init&&o.init(i),o.instances.push(i),i}function n(){let e=o.instances.indexOf(this);return -1!==e&&(o.instances.splice(e,1),!0)}function s(e,t){let r=o(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){return e instanceof Error?e.stack||e.message:e},o.disable=function(){let e=[...o.names.map(i),...o.skips.map(i).map(e=>"-"+e)].join(",");return o.enable(""),e},o.enable=function(e){let t;o.save(e),o.names=[],o.skips=[];let r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?o.skips.push(RegExp("^"+e.substr(1)+"$")):o.names.push(RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){let e=o.instances[t];e.enabled=o.enabled(e.namespace)}},o.enabled=function(e){let t,r;if("*"===e[e.length-1])return!0;for(t=0,r=o.skips.length;t<r;t++)if(o.skips[t].test(e))return!1;for(t=0,r=o.names.length;t<r;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=r(958),Object.keys(e).forEach(t=>{o[t]=e[t]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},792:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(237):e.exports=r(354)},354:(e,t,r)=>{let o=r(224),n=r(837);t.init=function(e){e.inspectOpts={};let r=Object.keys(t.inspectOpts);for(let o=0;o<r.length;o++)e.inspectOpts[r[o]]=t.inspectOpts[r[o]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){let{namespace:o,useColors:n}=this;if(n){let t=this.color,n="\x1b[3"+(t<8?t:"8;5;"+t),s=` ${n};1m${o} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(n+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+o+" "+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?!!t.inspectOpts.colors:o.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{let e=r(178);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)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),o=process.env[t];return o=!!/^(yes|on|true|enabled)$/i.test(o)||!/^(no|off|false|disabled)$/i.test(o)&&("null"===o?null:Number(o)),e[r]=o,e},{}),e.exports=r(573)(t);let{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},914:e=>{e.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":1===e.length?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return -1!==o&&(-1===n||o<n)}},958:e=>{function t(e,t,r,o){return Math.round(e/r)+" "+o+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var o,n,s,i,a=typeof e;if("string"===a&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===a&&isFinite(e)){return r.long?(n=Math.abs(o=e))>=864e5?t(o,n,864e5,"day"):n>=36e5?t(o,n,36e5,"hour"):n>=6e4?t(o,n,6e4,"minute"):n>=1e3?t(o,n,1e3,"second"):o+" ms":(i=Math.abs(s=e))>=864e5?Math.round(s/864e5)+"d":i>=36e5?Math.round(s/36e5)+"h":i>=6e4?Math.round(s/6e4)+"m":i>=1e3?Math.round(s/1e3)+"s":s+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},178:(e,t,r)=>{let o,n=r(37),s=r(224),i=r(914),{env:a}=process;function l(e,t={}){var r;return 0!==(r=function(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=function(){if("FORCE_COLOR"in a)return"true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(Number.parseInt(a.FORCE_COLOR,10),3)}();void 0!==s&&(o=s);let l=r?o:s;if(0===l)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&void 0===l)return 0;let u=l||0;if("dumb"===a.TERM)return u;if("win32"===process.platform){let e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(e=>e in a)||"codeship"===a.CI_NAME?1:u;if("TEAMCITY_VERSION"in a)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){let e=Number.parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:u}(e,{streamIsTTY:e&&e.isTTY,...t}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),e.exports={supportsColor:l,stdout:l({isTTY:s.isatty(1)}),stderr:l({isTTY:s.isatty(2)})}},37:e=>{e.exports=o},224:e=>{e.exports=n},837:e=>{e.exports=s}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var s=t[o]={exports:{}},i=!0;try{e[o](s,s.exports,r),i=!1}finally{i&&delete t[o]}return s.exports}return r.ab=g+"/",m.exports=r(792),m.exports}let x=i.fileURLToPath(import.meta.url),b=a.dirname(x);var v=c(function(){if(f)return h.exports;f=1;var o={448:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let n=r(361),s=o(r(937)),i=o(r(457)),a=s.default("agent-base");function l(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function u(e,t){return new u.Agent(e,t)}var c=u||(u={});class p extends n.EventEmitter{constructor(e,t){super();let r=t;"function"==typeof e?this.callback=e:e&&(r=e),this.timeout=null,r&&"number"==typeof r.timeout&&(this.timeout=r.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:l()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:l()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let r=Object.assign({},t);"boolean"!=typeof r.secureEndpoint&&(r.secureEndpoint=l()),null==r.host&&(r.host="localhost"),null==r.port&&(r.port=r.secureEndpoint?443:80),null==r.protocol&&(r.protocol=r.secureEndpoint?"https:":"http:"),r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let o=!1,n=null,s=r.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},c=e=>{o||(null!==n&&(clearTimeout(n),n=null),u(e))};if("function"!=typeof this.callback)return void u(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=i.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof s&&s>0&&(n=setTimeout(()=>{n=null,o=!0;let e=Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT",u(e)},s)),"port"in r&&"number"!=typeof r.port&&(r.port=Number(r.port));try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,r)).then(t=>{if(!o){if(null!=n&&(clearTimeout(n),n=null),t&&"function"==typeof t.addRequest){a("Callback returned another Agent instance %o",t.constructor.name),t.addRequest(e,r);return}if(t){t.once("free",()=>{this.freeSocket(t,r)}),e.onSocket(t);return}u(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}},c)}catch(e){Promise.reject(e).catch(c)}}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}c.Agent=p,c.prototype=c.Agent.prototype,e.exports=u},457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r){return new Promise((o,n)=>{e.call(this,t,r,(e,t)=>{e?n(e):o(t)})})}}},44:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,a)}l((o=o.apply(e,t||[])).next())})},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=n(r(808)),i=n(r(404)),a=n(r(310)),l=n(r(491)),u=n(r(937)),c=r(448),p=n(r(357)),f=u.default("https-proxy-agent:agent");class d extends c.Agent{constructor(e){var t;let r;if(!(r="string"==typeof e?a.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",r),super(r);let o=Object.assign({},r);this.secureProxy=r.secureProxy||"string"==typeof(t=o.protocol)&&/^https:?$/i.test(t),o.host=o.hostname||o.host,"string"==typeof o.port&&(o.port=parseInt(o.port,10)),!o.port&&o.host&&(o.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in o||(o.ALPNProtocols=["http 1.1"]),o.host&&o.path&&(delete o.path,delete o.pathname),this.proxy=o}callback(e,t){return o(this,void 0,void 0,function*(){var r,o;let n,{proxy:a,secureProxy:u}=this;u?(f("Creating `tls.Socket`: %o",a),n=i.default.connect(a)):(f("Creating `net.Socket`: %o",a),n=s.default.connect(a));let c=Object.assign({},a.headers),d=`${t.host}:${t.port}`,m=`CONNECT ${d} HTTP/1.1\r
|
|
1
|
+
import e from"assert";import t from"events";import r from"net";import o from"os";import n from"tty";import s from"util";import i from"node:url";import a from"node:path";import l from"tls";import u from"url";function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,f,d,h={exports:{}},m={exports:{}};let C=i.fileURLToPath(import.meta.url),g=a.dirname(C);function y(){if(p)return m.exports;p=1;var e={237:(e,t,r)=>{t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},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;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let o=0,n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(o++,"%c"===e&&(n=o))}),t.splice(n,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")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),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"],e.exports=r(573)(t);let{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},573:(e,t,r)=>{e.exports=function(e){function t(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){let r;function i(...e){if(!i.enabled)return;let t=Number(new Date);i.diff=t-(r||t),i.prev=r,i.curr=t,r=t,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let n=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if("%%"===t)return t;n++;let s=o.formatters[r];if("function"==typeof s){let r=e[n];t=s.call(i,r),e.splice(n,1),n--}return t}),o.formatArgs.call(i,e),(i.log||o.log).apply(i,e)}return i.namespace=e,i.enabled=o.enabled(e),i.useColors=o.useColors(),i.color=t(e),i.destroy=n,i.extend=s,"function"==typeof o.init&&o.init(i),o.instances.push(i),i}function n(){let e=o.instances.indexOf(this);return -1!==e&&(o.instances.splice(e,1),!0)}function s(e,t){let r=o(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){return e instanceof Error?e.stack||e.message:e},o.disable=function(){let e=[...o.names.map(i),...o.skips.map(i).map(e=>"-"+e)].join(",");return o.enable(""),e},o.enable=function(e){let t;o.save(e),o.names=[],o.skips=[];let r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?o.skips.push(RegExp("^"+e.substr(1)+"$")):o.names.push(RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){let e=o.instances[t];e.enabled=o.enabled(e.namespace)}},o.enabled=function(e){let t,r;if("*"===e[e.length-1])return!0;for(t=0,r=o.skips.length;t<r;t++)if(o.skips[t].test(e))return!1;for(t=0,r=o.names.length;t<r;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=r(958),Object.keys(e).forEach(t=>{o[t]=e[t]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},792:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(237):e.exports=r(354)},354:(e,t,r)=>{let o=r(224),n=r(837);t.init=function(e){e.inspectOpts={};let r=Object.keys(t.inspectOpts);for(let o=0;o<r.length;o++)e.inspectOpts[r[o]]=t.inspectOpts[r[o]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){let{namespace:o,useColors:n}=this;if(n){let t=this.color,n="\x1b[3"+(t<8?t:"8;5;"+t),s=` ${n};1m${o} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(n+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+o+" "+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?!!t.inspectOpts.colors:o.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{let e=r(178);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)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),o=process.env[t];return o=!!/^(yes|on|true|enabled)$/i.test(o)||!/^(no|off|false|disabled)$/i.test(o)&&("null"===o?null:Number(o)),e[r]=o,e},{}),e.exports=r(573)(t);let{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},914:e=>{e.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":1===e.length?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return -1!==o&&(-1===n||o<n)}},958:e=>{function t(e,t,r,o){return Math.round(e/r)+" "+o+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var o,n,s,i,a=typeof e;if("string"===a&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===a&&isFinite(e)){return r.long?(n=Math.abs(o=e))>=864e5?t(o,n,864e5,"day"):n>=36e5?t(o,n,36e5,"hour"):n>=6e4?t(o,n,6e4,"minute"):n>=1e3?t(o,n,1e3,"second"):o+" ms":(i=Math.abs(s=e))>=864e5?Math.round(s/864e5)+"d":i>=36e5?Math.round(s/36e5)+"h":i>=6e4?Math.round(s/6e4)+"m":i>=1e3?Math.round(s/1e3)+"s":s+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},178:(e,t,r)=>{let o,n=r(37),s=r(224),i=r(914),{env:a}=process;function l(e,t={}){var r;return 0!==(r=function(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=function(){if("FORCE_COLOR"in a)return"true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(Number.parseInt(a.FORCE_COLOR,10),3)}();void 0!==s&&(o=s);let l=r?o:s;if(0===l)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&void 0===l)return 0;let u=l||0;if("dumb"===a.TERM)return u;if("win32"===process.platform){let e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(e=>e in a)||"codeship"===a.CI_NAME?1:u;if("TEAMCITY_VERSION"in a)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){let e=Number.parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:u}(e,{streamIsTTY:e&&e.isTTY,...t}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),e.exports={supportsColor:l,stdout:l({isTTY:s.isatty(1)}),stderr:l({isTTY:s.isatty(2)})}},37:e=>{e.exports=o},224:e=>{e.exports=n},837:e=>{e.exports=s}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var s=t[o]={exports:{}},i=!0;try{e[o](s,s.exports,r),i=!1}finally{i&&delete t[o]}return s.exports}return r.ab=g+"/",m.exports=r(792),m.exports}let x=i.fileURLToPath(import.meta.url),b=a.dirname(x);var v=c(function(){if(f)return h.exports;f=1;var o={448:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let n=r(361),s=o(r(937)),i=o(r(457)),a=s.default("agent-base");function l(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function u(e,t){return new u.Agent(e,t)}var c=u||(u={});class p extends n.EventEmitter{constructor(e,t){super();let r=t;"function"==typeof e?this.callback=e:e&&(r=e),this.timeout=null,r&&"number"==typeof r.timeout&&(this.timeout=r.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:l()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:l()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let r=Object.assign({},t);"boolean"!=typeof r.secureEndpoint&&(r.secureEndpoint=l()),null==r.host&&(r.host="localhost"),null==r.port&&(r.port=r.secureEndpoint?443:80),null==r.protocol&&(r.protocol=r.secureEndpoint?"https:":"http:"),r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let o=!1,n=null,s=r.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},c=e=>{o||(null!==n&&(clearTimeout(n),n=null),u(e))},p=t=>{if(!o){if(null!=n&&(clearTimeout(n),n=null),t&&"function"==typeof t.addRequest){a("Callback returned another Agent instance %o",t.constructor.name),t.addRequest(e,r);return}if(t){t.once("free",()=>{this.freeSocket(t,r)}),e.onSocket(t);return}u(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void u(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=i.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof s&&s>0&&(n=setTimeout(()=>{n=null,o=!0;let e=Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT",u(e)},s)),"port"in r&&"number"!=typeof r.port&&(r.port=Number(r.port));try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,r)).then(p,c)}catch(e){Promise.reject(e).catch(c)}}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}c.Agent=p,c.prototype=c.Agent.prototype,e.exports=u},457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r){return new Promise((o,n)=>{e.call(this,t,r,(e,t)=>{e?n(e):o(t)})})}}},44:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,a)}l((o=o.apply(e,t||[])).next())})},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=n(r(808)),i=n(r(404)),a=n(r(310)),l=n(r(491)),u=n(r(937)),c=r(448),p=n(r(357)),f=u.default("https-proxy-agent:agent");class d extends c.Agent{constructor(e){var t;let r;if(!(r="string"==typeof e?a.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",r),super(r);let o=Object.assign({},r);this.secureProxy=r.secureProxy||"string"==typeof(t=o.protocol)&&/^https:?$/i.test(t),o.host=o.hostname||o.host,"string"==typeof o.port&&(o.port=parseInt(o.port,10)),!o.port&&o.host&&(o.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in o||(o.ALPNProtocols=["http 1.1"]),o.host&&o.path&&(delete o.path,delete o.pathname),this.proxy=o}callback(e,t){return o(this,void 0,void 0,function*(){var r,o;let n,{proxy:a,secureProxy:u}=this;u?(f("Creating `tls.Socket`: %o",a),n=i.default.connect(a)):(f("Creating `net.Socket`: %o",a),n=s.default.connect(a));let c=Object.assign({},a.headers),d=`${t.host}:${t.port}`,m=`CONNECT ${d} HTTP/1.1\r
|
|
2
2
|
`;a.auth&&(c["Proxy-Authorization"]=`Basic ${Buffer.from(a.auth).toString("base64")}`);let{host:C,port:g,secureEndpoint:y}=t;for(let e of(r=g,((o=y)||80!==r)&&(!o||443!==r)&&(C+=`:${g}`),c.Host=C,c.Connection="close",Object.keys(c)))m+=`${e}: ${c[e]}\r
|
|
3
3
|
`;let x=p.default(n);n.write(`${m}\r
|
|
4
|
-
`);let{statusCode:b,buffered:v}=yield x;if(200===b){if(e.once("socket",h),t.secureEndpoint){f("Upgrading socket connection to TLS");let e=t.servername||t.host;return i.default.connect(Object.assign(Object.assign({},function(e,...t){let r,o={};for(r in e)t.includes(r)||(o[r]=e[r]);return o}(t,"host","hostname","path","port")),{socket:n,servername:e}))}return n}n.destroy();let F=new s.default.Socket({writable:!1});return F.readable=!0,e.once("socket",e=>{f("replaying proxy buffer for failed request"),l.default(e.listenerCount("data")>0),e.push(v),e.push(null)}),F})}}function h(e){e.resume()}t.default=d},157:function(e,t,r){var o;let n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(44));function s(e){return new n.default(e)}(o=s||(s={})).HttpsProxyAgent=n.default,o.prototype=n.default.prototype,e.exports=s},357:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let n=o(r(937)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise((t,r)=>{let o=0,s=[];function i(){let r=e.read();r?function(e){s.push(e),o+=e.length;let r=Buffer.concat(s,o);if(-1===r.indexOf("\r\n\r\n")){n("have not received end of HTTP headers yet..."),i();return}let a=r.toString("ascii",0,r.indexOf("\r\n")),l=+a.split(" ")[1];n("got proxy server response: %o",a),t({statusCode:l,buffered:r})}(r):e.once("readable",i)}function a(e){n("onclose had error %o",e)}function l(){n("onend")}e.on("error",function t(o){e.removeListener("end",l),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",i),n("onerror %o",o),r(o)}),e.on("close",a),e.on("end",l),i()})}},491:t=>{t.exports=e},361:e=>{e.exports=t},808:e=>{e.exports=r},937:e=>{e.exports=y()},404:e=>{e.exports=l},310:e=>{e.exports=u}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}},i=!0;try{o[e].call(r.exports,r,r.exports,s),i=!1}finally{i&&delete n[e]}return r.exports}return s.ab=b+"/",h.exports=s(157),h.exports}()),F={exports:{}};let _=i.fileURLToPath(import.meta.url),O=a.dirname(_);var k=c(function(){if(d)return F.exports;d=1;var e={862:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:r}={}){return new Promise((o,n)=>{function s(){null==r||r.removeEventListener("abort",s),e.removeListener(t,i),e.removeListener("error",a)}function i(...e){s(),o(e)}function a(e){s(),n(e)}null==r||r.addEventListener("abort",s),e.on(t,i),e.on("error",a)})}},448:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let n=r(361),s=o(r(937)),i=o(r(457)),a=s.default("agent-base");function l(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function u(e,t){return new u.Agent(e,t)}var c=u||(u={});class p extends n.EventEmitter{constructor(e,t){super();let r=t;"function"==typeof e?this.callback=e:e&&(r=e),this.timeout=null,r&&"number"==typeof r.timeout&&(this.timeout=r.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:l()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:l()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let r=Object.assign({},t);"boolean"!=typeof r.secureEndpoint&&(r.secureEndpoint=l()),null==r.host&&(r.host="localhost"),null==r.port&&(r.port=r.secureEndpoint?443:80),null==r.protocol&&(r.protocol=r.secureEndpoint?"https:":"http:"),r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let o=!1,n=null,s=r.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},c=e=>{o||(null!==n&&(clearTimeout(n),n=null),u(e))};if("function"!=typeof this.callback)return void u(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=i.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof s&&s>0&&(n=setTimeout(()=>{n=null,o=!0;let e=Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT",u(e)},s)),"port"in r&&"number"!=typeof r.port&&(r.port=Number(r.port));try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,r)).then(
|
|
4
|
+
`);let{statusCode:b,buffered:v}=yield x;if(200===b){if(e.once("socket",h),t.secureEndpoint){f("Upgrading socket connection to TLS");let e=t.servername||t.host;return i.default.connect(Object.assign(Object.assign({},function(e,...t){let r,o={};for(r in e)t.includes(r)||(o[r]=e[r]);return o}(t,"host","hostname","path","port")),{socket:n,servername:e}))}return n}n.destroy();let F=new s.default.Socket({writable:!1});return F.readable=!0,e.once("socket",e=>{f("replaying proxy buffer for failed request"),l.default(e.listenerCount("data")>0),e.push(v),e.push(null)}),F})}}function h(e){e.resume()}t.default=d},157:function(e,t,r){var o;let n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(44));function s(e){return new n.default(e)}(o=s||(s={})).HttpsProxyAgent=n.default,o.prototype=n.default.prototype,e.exports=s},357:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let n=o(r(937)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise((t,r)=>{let o=0,s=[];function i(){let r=e.read();r?function(e){s.push(e),o+=e.length;let r=Buffer.concat(s,o);if(-1===r.indexOf("\r\n\r\n")){n("have not received end of HTTP headers yet..."),i();return}let a=r.toString("ascii",0,r.indexOf("\r\n")),l=+a.split(" ")[1];n("got proxy server response: %o",a),t({statusCode:l,buffered:r})}(r):e.once("readable",i)}function a(e){n("onclose had error %o",e)}function l(){n("onend")}e.on("error",function t(o){e.removeListener("end",l),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",i),n("onerror %o",o),r(o)}),e.on("close",a),e.on("end",l),i()})}},491:t=>{t.exports=e},361:e=>{e.exports=t},808:e=>{e.exports=r},937:e=>{e.exports=y()},404:e=>{e.exports=l},310:e=>{e.exports=u}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}},i=!0;try{o[e].call(r.exports,r,r.exports,s),i=!1}finally{i&&delete n[e]}return r.exports}return s.ab=b+"/",h.exports=s(157),h.exports}()),F={exports:{}};let _=i.fileURLToPath(import.meta.url),O=a.dirname(_);var k=c(function(){if(d)return F.exports;d=1;var e={862:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:r}={}){return new Promise((o,n)=>{function s(){null==r||r.removeEventListener("abort",s),e.removeListener(t,i),e.removeListener("error",a)}function i(...e){s(),o(e)}function a(e){s(),n(e)}null==r||r.addEventListener("abort",s),e.on(t,i),e.on("error",a)})}},448:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let n=r(361),s=o(r(937)),i=o(r(457)),a=s.default("agent-base");function l(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function u(e,t){return new u.Agent(e,t)}var c=u||(u={});class p extends n.EventEmitter{constructor(e,t){super();let r=t;"function"==typeof e?this.callback=e:e&&(r=e),this.timeout=null,r&&"number"==typeof r.timeout&&(this.timeout=r.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:l()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:l()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let r=Object.assign({},t);"boolean"!=typeof r.secureEndpoint&&(r.secureEndpoint=l()),null==r.host&&(r.host="localhost"),null==r.port&&(r.port=r.secureEndpoint?443:80),null==r.protocol&&(r.protocol=r.secureEndpoint?"https:":"http:"),r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let o=!1,n=null,s=r.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},c=e=>{o||(null!==n&&(clearTimeout(n),n=null),u(e))},p=t=>{if(!o){if(null!=n&&(clearTimeout(n),n=null),t&&"function"==typeof t.addRequest){a("Callback returned another Agent instance %o",t.constructor.name),t.addRequest(e,r);return}if(t){t.once("free",()=>{this.freeSocket(t,r)}),e.onSocket(t);return}u(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void u(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=i.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof s&&s>0&&(n=setTimeout(()=>{n=null,o=!0;let e=Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT",u(e)},s)),"port"in r&&"number"!=typeof r.port&&(r.port=Number(r.port));try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,r)).then(p,c)}catch(e){Promise.reject(e).catch(c)}}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}c.Agent=p,c.prototype=c.Agent.prototype,e.exports=u},457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r){return new Promise((o,n)=>{e.call(this,t,r,(e,t)=>{e?n(e):o(t)})})}}},386:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,a)}l((o=o.apply(e,t||[])).next())})},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=n(r(808)),i=n(r(404)),a=n(r(310)),l=n(r(937)),u=n(r(862)),c=r(448),p=(0,l.default)("http-proxy-agent");class f extends c.Agent{constructor(e){var t;let r;if(!(r="string"==typeof e?a.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");p("Creating new HttpProxyAgent instance: %o",r),super(r);let o=Object.assign({},r);this.secureProxy=r.secureProxy||"string"==typeof(t=o.protocol)&&/^https:?$/i.test(t),o.host=o.hostname||o.host,"string"==typeof o.port&&(o.port=parseInt(o.port,10)),!o.port&&o.host&&(o.port=this.secureProxy?443:80),o.host&&o.path&&(delete o.path,delete o.pathname),this.proxy=o}callback(e,t){return o(this,void 0,void 0,function*(){let r,{proxy:o,secureProxy:n}=this,l=a.default.parse(e.path);if(l.protocol||(l.protocol="http:"),l.hostname||(l.hostname=t.hostname||t.host||null),null==l.port&&(t.port,1)&&(l.port=String(t.port)),"80"===l.port&&(l.port=""),e.path=a.default.format(l),o.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(o.auth).toString("base64")}`),n?(p("Creating `tls.Socket`: %o",o),r=i.default.connect(o)):(p("Creating `net.Socket`: %o",o),r=s.default.connect(o)),e._header){let t,r;p("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(p("Patching connection write() output buffer with updated header"),r=(t=e.output[0]).indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(r),p("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(p("Patching connection write() output buffer with updated header"),r=(t=e.outputData[0].data).indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(r),p("Output buffer: %o",e.outputData[0].data))}return yield(0,u.default)(r,"connect"),r})}}t.default=f},289:function(e,t,r){var o;let n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(386));function s(e){return new n.default(e)}(o=s||(s={})).HttpProxyAgent=n.default,o.prototype=n.default.prototype,e.exports=s},361:e=>{e.exports=t},808:e=>{e.exports=r},937:e=>{e.exports=y()},404:e=>{e.exports=l},310:e=>{e.exports=u}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}},i=!0;try{e[t].call(s.exports,s,s.exports,n),i=!1}finally{i&&delete o[t]}return s.exports}return n.ab=O+"/",F.exports=n(289),F.exports}());function w(){let e=process.env.https_proxy||process.env.HTTPS_PROXY;if(e)return new v(e);let t=process.env.http_proxy||process.env.HTTP_PROXY;if(t)return new k(t)}export{w as getProxyAgent};
|
package/manifest/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type NextFontManifest = Readonly<
|
|
|
4
4
|
}
|
|
5
5
|
>
|
|
6
6
|
|
|
7
|
-
declare const manifest: NextFontManifest
|
|
7
|
+
export declare const manifest: NextFontManifest
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Get hrefs for fonts to preload
|
|
@@ -13,9 +13,9 @@ declare const manifest: NextFontManifest
|
|
|
13
13
|
* Returns empty string[] if there are fonts but none to preload and no other fonts have been preloaded
|
|
14
14
|
* Returns null if there are fonts but none to preload and at least some were previously preloaded
|
|
15
15
|
*/
|
|
16
|
-
declare const getPreloadableFonts: (filePath?: string) => string[] | null
|
|
16
|
+
export declare const getPreloadableFonts: (filePath?: string) => string[] | null
|
|
17
17
|
|
|
18
|
-
declare const getFontMetadata: (filePath?: string) => {
|
|
18
|
+
export declare const getFontMetadata: (filePath?: string) => {
|
|
19
19
|
preconnect: {
|
|
20
20
|
href: string
|
|
21
21
|
type: string
|
|
@@ -29,4 +29,8 @@ declare const getFontMetadata: (filePath?: string) => {
|
|
|
29
29
|
}[]
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export {
|
|
32
|
+
export default {
|
|
33
|
+
manifest,
|
|
34
|
+
getPreloadableFonts,
|
|
35
|
+
getFontMetadata,
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-font",
|
|
3
3
|
"description": "@next/font (next/font) replacement",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"license": "BSD-2-Clause",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -39,7 +39,10 @@
|
|
|
39
39
|
"import": "./dist/*.js",
|
|
40
40
|
"types": "./dist/*.d.ts"
|
|
41
41
|
},
|
|
42
|
-
".":
|
|
42
|
+
".": {
|
|
43
|
+
"import": "./dist/index.js",
|
|
44
|
+
"types": "./dist/index.d.ts"
|
|
45
|
+
}
|
|
43
46
|
},
|
|
44
47
|
"scripts": {
|
|
45
48
|
"build": "bun run clean && turbo run build-next-font && turbo run build-src",
|