From 9c183ed6ccc0729e9106ff845226252e5eb42fe1 Mon Sep 17 00:00:00 2001 From: hustcer Date: Thu, 27 Jun 2024 16:00:31 +0800 Subject: [PATCH] ci skip --- dist/index.js | 2 +- src/plugins.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index b8f87f8..c522158 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34,4 +34,4 @@ e.exports=runParallel;const s=r(1504);function runParallel(e,t){let r,n,o;let i= * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. - */const s=r(7378);const toRegexRange=(e,t,r)=>{if(s(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(s(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let n={relaxZeros:true,...r};if(typeof n.strictZeros==="boolean"){n.relaxZeros=n.strictZeros===false}let o=String(n.relaxZeros);let i=String(n.shorthand);let a=String(n.capture);let c=String(n.wrap);let u=e+":"+t+"="+o+i+a+c;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(n.capture){return`(${r})`}if(n.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let h={min:e,max:t,a:l,b:p};let m=[];let g=[];if(d){h.isPadded=d;h.maxLen=String(h.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),h,n);l=h.a=0}if(p>=0){m=splitToPatterns(l,p,h,n)}h.negatives=g;h.positives=m;h.result=collatePatterns(g,m,n);if(n.capture===true){h.result=`(${h.result})`}else if(n.wrap!==false&&m.length+g.length>1){h.result=`(?:${h.result})`}toRegexRange.cache[u]=h;return h.result};function collatePatterns(e,t,r){let s=filterPatterns(e,t,"-",false,r)||[];let n=filterPatterns(t,e,"",false,r)||[];let o=filterPatterns(e,t,"-?",true,r)||[];let i=s.concat(o).concat(n);return i.join("|")}function splitToRanges(e,t){let r=1;let s=1;let n=countNines(e,r);let o=new Set([t]);while(e<=n&&n<=t){o.add(n);r+=1;n=countNines(e,r)}n=countZeros(t+1,s)-1;while(e1){a.count.pop()}a.count.push(c.count[0]);a.string=a.pattern+toQuantifier(a.count);i=t+1;continue}if(r.isPadded){u=padZeros(t,r,s)}c.string=u+c.pattern+toQuantifier(c.count);o.push(c);i=t+1;a=c}return o}function filterPatterns(e,t,r,s,n){let o=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){o.push(r+e)}if(s&&contains(t,"string",e)){o.push(r+e)}}return o}function zip(e,t){let r=[];for(let s=0;st?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},4225:(e,t,r)=>{e.exports=r(4030)},4030:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var c=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}if(a.length>0){l("got illegal response body from proxy");i.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getUserAgent(){if(typeof navigator==="object"&&"userAgent"in navigator){return navigator.userAgent}if(typeof process==="object"&&"version"in process){return`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`}return""}t.getUserAgent=getUserAgent},2937:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var s=r||0;var n=t;return[n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]]].join("")}e.exports=bytesToUuid},5403:(e,t,r)=>{var s=r(6113);e.exports=function nodeRNG(){return s.randomBytes(16)}},7191:(e,t,r)=>{var s=r(5403);var n=r(2937);function v4(e,t,r){var o=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var i=e.random||(e.rng||s)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){for(var a=0;a<16;++a){t[o+a]=i[a]}}return t||n(i)}e.exports=v4},7338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return p.default}});var s=_interopRequireDefault(r(6101));var n=_interopRequireDefault(r(9456));var o=_interopRequireDefault(r(1071));var i=_interopRequireDefault(r(8057));var a=_interopRequireDefault(r(7448));var c=_interopRequireDefault(r(5530));var u=_interopRequireDefault(r(324));var l=_interopRequireDefault(r(5284));var p=_interopRequireDefault(r(6067));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},8612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},7448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},6067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},7610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},6750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){s.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},4920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},5284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,s.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},6101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6750));var n=_interopRequireDefault(r(5284));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let i;let a=0;let c=0;function v1(e,t,r){let u=t&&r||0;const l=t||new Array(16);e=e||{};let p=e.node||o;let d=e.clockseq!==undefined?e.clockseq:i;if(p==null||d==null){const t=e.random||(e.rng||s.default)();if(p==null){p=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=i=(t[6]<<8|t[7])&16383}}let h=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:c+1;const g=h-a+(m-c)/1e4;if(g<0&&e.clockseq===undefined){d=d+1&16383}if((g<0||h>a)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=h;c=m;i=d;h+=122192928e5;const E=((h&268435455)*1e4+m)%4294967296;l[u++]=E>>>24&255;l[u++]=E>>>16&255;l[u++]=E>>>8&255;l[u++]=E&255;const v=h/4294967296*1e4&268435455;l[u++]=v>>>8&255;l[u++]=v&255;l[u++]=v>>>24&15|16;l[u++]=v>>>16&255;l[u++]=d>>>8|128;l[u++]=d&255;for(let e=0;e<6;++e){l[u+e]=p[e]}return t||(0,n.default)(l)}var u=v1;t["default"]=u},9456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(9390));var n=_interopRequireDefault(r(8612));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v3",48,n.default);var i=o;t["default"]=i},9390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var s=_interopRequireDefault(r(5284));var n=_interopRequireDefault(r(6067));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6750));var n=_interopRequireDefault(r(5284));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||s.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},8057:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(9390));var n=_interopRequireDefault(r(4920));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v5",80,n.default);var i=o;t["default"]=i},324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(7610));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var n=validate;t["default"]=n},5530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},666:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{const t=e.assets.find((e=>s.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}})).filter((e=>e&&t?l.satisfies(e.version,t):true))}function filterLatest(e,t){const r=getTargets(t);const s=e.data.map((e=>e.tag_name));const n=l.rsort(s)[0];return e.data.filter((e=>e&&e.tag_name===n)).map((e=>{const t=e.assets.find((e=>r.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}}))}function filterLatestNightly(e,t){const r=getTargets(t);const s=e.data.map((e=>e.published_at));const n=s.sort(((e,t)=>new Date(t).getTime()-new Date(e).getTime()));const o=n[0];p.info(`Try to get latest nightly version published at: ${o}`);return e.data.filter((e=>e&&e.published_at===o)).map((e=>{const t=e.assets.find((e=>r.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}}))}function getRelease(e){return i(this,void 0,void 0,(function*(){const{owner:t,name:r,versionSpec:s,checkLatest:n=false,features:o="default"}=e;const i=s==="nightly";const a=new h.Octokit({auth:e.githubToken});return a.paginate(a.repos.listReleases,{owner:t,repo:r},((e,t)=>{const r=i?filterLatestNightly(e,o):[];const a=n?filterLatest(e,o):filterMatch(e,s,o);const c=i?r:a;if(c){t()}return c})).then((e=>{const t=e.find((e=>e!=null));if(t===undefined){if(o==="full"){p.warning('The "full" feature was removed for Nu after v0.93.1, try to use "default" feature instead.')}throw new Error(`No release for Nusehll matching version specifier ${s} of ${o} feature.`)}return t}))}))}function handleBadBinaryPermissions(e,t){return i(this,void 0,void 0,(function*(){const{name:r,bin:s}=e;if(process.platform!=="win32"){const findBin=()=>i(this,void 0,void 0,(function*(){var e,s,n,o;const i=yield m.promises.readdir(t);try{for(var c=true,u=a(i),l;l=yield u.next(),e=l.done,!e;c=true){o=l.value;c=false;const e=o;if(e.toLowerCase()===r.toLowerCase()){return e}}}catch(e){s={error:e}}finally{try{if(!c&&!e&&(n=u.return))yield n.call(u)}finally{if(s)throw s.error}}return r}));const e=c.join(t,s?s:yield findBin());try{yield m.promises.access(e,m.constants.X_OK)}catch(t){yield m.promises.chmod(e,"755");p.debug(`Fixed file permissions (-> 0o755) for ${e}`)}}}))}function checkOrInstallTool(e){return i(this,void 0,void 0,(function*(){const{name:t,versionSpec:r}=e;let s=d.find(t,r||"*");if(!s){const{version:r,downloadUrl:n}=yield getRelease(e);const o=yield d.downloadTool(n);p.debug(`Successfully downloaded ${t} v${r}`);let i;if(n.endsWith(".zip")){i=yield d.extractZip(o)}else{i=yield d.extractTar(o)}p.debug(`Successfully extracted archive for ${t} v${r}`);const a=yield(0,u.globby)([`${i}/**/nu_plugin_*`,c.join(i,"**","nu_plugin_*").replace(/\\/g,"/")],{unique:true,absolute:true});s=yield d.cacheDir(c.dirname(a[0]),t,r);yield handleBadBinaryPermissions(e,s)}const n=c.basename(c.dirname(s));return Object.assign({version:n,dir:s},e)}))}},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")},9945:(e,t,r)=>{"use strict";r.r(t);r.d(t,{convertPathToPattern:()=>L,generateGlobTasks:()=>x,generateGlobTasksSync:()=>G,globby:()=>P,globbyStream:()=>A,globbySync:()=>k,isDynamicPattern:()=>C,isGitIgnored:()=>isGitIgnored,isGitIgnoredSync:()=>isGitIgnoredSync});const s=require("node:process");const n=require("node:fs");const o=require("node:path");const i=require("node:events");const a=require("node:stream");const c=require("node:stream/promises");function mergeStreams(e){if(!Array.isArray(e)){throw new TypeError(`Expected an array, got \`${typeof e}\`.`)}for(const t of e){validateStream(t)}const t=e.some((({readableObjectMode:e})=>e));const r=getHighWaterMark(e,t);const s=new MergedStream({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e){s.add(t)}if(e.length===0){s.end()}return s}const getHighWaterMark=(e,t)=>{if(e.length===0){return 16384}const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class MergedStream extends a.PassThrough{#e=new Set([]);#t=new Set([]);#r;constructor(...e){super(...e);this.#r=onMergedStreamFinished(this,this.#e)}add(e){if(this.#e.has(e)){return}validateStream(e);if(!this.writable){throw new TypeError("The merged stream has already ended.")}this.#e.add(e);endWhenStreamsDone({passThroughStream:this,stream:e,streams:this.#e,ended:this.#t,onFinished:this.#r});updateMaxListeners(this,p);e.pipe(this,{end:false})}remove(e){if(!this.#e.has(e)){throw new TypeError("Stream cannot be removed because it was not piped.")}e.unpipe(this)}}const onMergedStreamFinished=async(e,t)=>{updateMaxListeners(e,l);const r=new AbortController;try{await Promise.race([onMergedStreamEnd(e,r),onInputStreamsUnpipe(e,t,r)])}finally{r.abort();updateMaxListeners(e,-l)}};const onMergedStreamEnd=async(e,{signal:t})=>{try{await(0,c.finished)(e,{signal:t,cleanup:true})}catch{}};const onInputStreamsUnpipe=async(e,t,{signal:r})=>{for await(const[s]of(0,i.on)(e,"unpipe",{signal:r})){if(t.has(s)){s.emit(u)}}};const validateStream=e=>{if(typeof e?.pipe!=="function"){throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)}};const endWhenStreamsDone=async({passThroughStream:e,stream:t,streams:r,ended:s,onFinished:n})=>{try{const o=new AbortController;try{await Promise.race([n,onInputStreamEnd({stream:t,streams:r,ended:s,abortController:o}),onInputStreamUnpipe({passThroughStream:e,stream:t,streams:r,ended:s,abortController:o})])}finally{o.abort()}if(r.size===s.size&&e.writable){e.end()}}catch(t){if(t?.code==="ERR_STREAM_PREMATURE_CLOSE"){e.destroy()}else{e.destroy(t)}}};const onInputStreamEnd=async({stream:e,streams:t,ended:r,abortController:{signal:s}})=>{await(0,c.finished)(e,{signal:s,cleanup:true,readable:true,writable:false});if(t.has(e)){r.add(e)}};const onInputStreamUnpipe=async({passThroughStream:e,stream:t,streams:r,ended:s,abortController:{signal:n}})=>{await(0,i.once)(t,u,{signal:n});r.delete(t);s.delete(t);updateMaxListeners(e,-p)};const u=Symbol("unpipe");const updateMaxListeners=(e,t)=>{e.setMaxListeners(e.getMaxListeners()+t)};const l=2;const p=1;var d=r(6581);var h=r(7147);async function isType(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{const s=await h.promises[e](r);return s[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}function isTypeSync(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{return h[e](r)[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}const m=isType.bind(null,"stat","isFile");const g=isType.bind(null,"stat","isDirectory");const E=isType.bind(null,"lstat","isSymbolicLink");const v=isTypeSync.bind(null,"statSync","isFile");const y=isTypeSync.bind(null,"statSync","isDirectory");const _=isTypeSync.bind(null,"lstatSync","isSymbolicLink");const b=require("node:url");function toPath(e){return e instanceof URL?(0,b.fileURLToPath)(e):e}const w=require("node:fs/promises");var T=r(8829);function slash(e){const t=e.startsWith("\\\\?\\");if(t){return e}return e.replace(/\\/g,"/")}const isNegativePattern=e=>e[0]==="!";const S=["**/node_modules","**/flow-typed","**/coverage","**/.git"];const O={absolute:true,dot:true};const R="**/.gitignore";const applyBaseToPattern=(e,t)=>isNegativePattern(e)?"!"+o.posix.join(t,e.slice(1)):o.posix.join(t,e);const parseIgnoreFile=(e,t)=>{const r=slash(o.relative(t,o.dirname(e.filePath)));return e.content.split(/\r?\n/).filter((e=>e&&!e.startsWith("#"))).map((e=>applyBaseToPattern(e,r)))};const toRelativePath=(e,t)=>{t=slash(t);if(o.isAbsolute(e)){if(slash(e).startsWith(t)){return o.relative(t,e)}throw new Error(`Path ${e} is not in cwd ${t}`)}return e};const getIsIgnoredPredicate=(e,t)=>{const r=e.flatMap((e=>parseIgnoreFile(e,t)));const s=T().add(r);return e=>{e=toPath(e);e=toRelativePath(e,t);return e?s.ignores(slash(e)):false}};const normalizeOptions=(e={})=>({cwd:toPath(e.cwd)??s.cwd(),suppressErrors:Boolean(e.suppressErrors),deep:typeof e.deep==="number"?e.deep:Number.POSITIVE_INFINITY,ignore:[...e.ignore??[],...S]});const isIgnoredByIgnoreFiles=async(e,t)=>{const{cwd:r,suppressErrors:s,deep:n,ignore:o}=normalizeOptions(t);const i=await d(e,{cwd:r,suppressErrors:s,deep:n,ignore:o,...O});const a=await Promise.all(i.map((async e=>({filePath:e,content:await w.readFile(e,"utf8")}))));return getIsIgnoredPredicate(a,r)};const isIgnoredByIgnoreFilesSync=(e,t)=>{const{cwd:r,suppressErrors:s,deep:o,ignore:i}=normalizeOptions(t);const a=d.sync(e,{cwd:r,suppressErrors:s,deep:o,ignore:i,...O});const c=a.map((e=>({filePath:e,content:n.readFileSync(e,"utf8")})));return getIsIgnoredPredicate(c,r)};const isGitIgnored=e=>isIgnoredByIgnoreFiles(R,e);const isGitIgnoredSync=e=>isIgnoredByIgnoreFilesSync(R,e);const assertPatternsInput=e=>{if(e.some((e=>typeof e!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const normalizePathForDirectoryGlob=(e,t)=>{const r=isNegativePattern(e)?e.slice(1):e;return o.isAbsolute(r)?r:o.join(t,r)};const getDirectoryGlob=({directoryPath:e,files:t,extensions:r})=>{const s=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return t?t.map((t=>o.posix.join(e,`**/${o.extname(t)?t:`${t}${s}`}`))):[o.posix.join(e,`**${s?`/*${s}`:""}`)]};const directoryToGlob=async(e,{cwd:t=s.cwd(),files:r,extensions:n}={})=>{const o=await Promise.all(e.map((async e=>await g(normalizePathForDirectoryGlob(e,t))?getDirectoryGlob({directoryPath:e,files:r,extensions:n}):e)));return o.flat()};const directoryToGlobSync=(e,{cwd:t=s.cwd(),files:r,extensions:n}={})=>e.flatMap((e=>y(normalizePathForDirectoryGlob(e,t))?getDirectoryGlob({directoryPath:e,files:r,extensions:n}):e));const toPatternsArray=e=>{e=[...new Set([e].flat())];assertPatternsInput(e);return e};const checkCwdOption=e=>{if(!e){return}let t;try{t=n.statSync(e)}catch{return}if(!t.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(e={})=>{e={...e,ignore:e.ignore??[],expandDirectories:e.expandDirectories??true,cwd:toPath(e.cwd)};checkCwdOption(e.cwd);return e};const normalizeArguments=e=>async(t,r)=>e(toPatternsArray(t),globby_normalizeOptions(r));const normalizeArgumentsSync=e=>(t,r)=>e(toPatternsArray(t),globby_normalizeOptions(r));const getIgnoreFilesPatterns=e=>{const{ignoreFiles:t,gitignore:r}=e;const s=t?toPatternsArray(t):[];if(r){s.push(R)}return s};const getFilter=async e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&await isIgnoredByIgnoreFiles(t,e))};const getFilterSync=e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&isIgnoredByIgnoreFilesSync(t,e))};const createFilterFunction=e=>{const t=new Set;return r=>{const s=o.normalize(r.path??r);if(t.has(s)||e&&e(s)){return false}t.add(s);return true}};const unionFastGlobResults=(e,t)=>e.flat().filter((e=>t(e)));const convertNegativePatterns=(e,t)=>{const r=[];while(e.length>0){const s=e.findIndex((e=>isNegativePattern(e)));if(s===-1){r.push({patterns:e,options:t});break}const n=e[s].slice(1);for(const e of r){e.options.ignore.push(n)}if(s!==0){r.push({patterns:e.slice(0,s),options:{...t,ignore:[...t.ignore,n]}})}e=e.slice(s+1)}return r};const normalizeExpandDirectoriesOption=(e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e});const generateTasks=async(e,t)=>{const r=convertNegativePatterns(e,t);const{cwd:s,expandDirectories:n}=t;if(!n){return r}const o=normalizeExpandDirectoriesOption(n,s);return Promise.all(r.map((async e=>{let{patterns:t,options:r}=e;[t,r.ignore]=await Promise.all([directoryToGlob(t,o),directoryToGlob(r.ignore,{cwd:s})]);return{patterns:t,options:r}})))};const generateTasksSync=(e,t)=>{const r=convertNegativePatterns(e,t);const{cwd:s,expandDirectories:n}=t;if(!n){return r}const o=normalizeExpandDirectoriesOption(n,s);return r.map((e=>{let{patterns:t,options:r}=e;t=directoryToGlobSync(t,o);r.ignore=directoryToGlobSync(r.ignore,{cwd:s});return{patterns:t,options:r}}))};const P=normalizeArguments((async(e,t)=>{const[r,s]=await Promise.all([generateTasks(e,t),getFilter(t)]);const n=await Promise.all(r.map((e=>d(e.patterns,e.options))));return unionFastGlobResults(n,s)}));const k=normalizeArgumentsSync(((e,t)=>{const r=generateTasksSync(e,t);const s=getFilterSync(t);const n=r.map((e=>d.sync(e.patterns,e.options)));return unionFastGlobResults(n,s)}));const A=normalizeArgumentsSync(((e,t)=>{const r=generateTasksSync(e,t);const s=getFilterSync(t);const n=r.map((e=>d.stream(e.patterns,e.options)));const o=mergeStreams(n).filter((e=>s(e)));return o}));const C=normalizeArgumentsSync(((e,t)=>e.some((e=>d.isDynamicPattern(e,t)))));const x=normalizeArguments(generateTasks);const G=normalizeArgumentsSync(generateTasksSync);const{convertPathToPattern:L}=d}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={id:r,loaded:false,exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(2694);module.exports=r})(); \ No newline at end of file + */const s=r(7378);const toRegexRange=(e,t,r)=>{if(s(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(s(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let n={relaxZeros:true,...r};if(typeof n.strictZeros==="boolean"){n.relaxZeros=n.strictZeros===false}let o=String(n.relaxZeros);let i=String(n.shorthand);let a=String(n.capture);let c=String(n.wrap);let u=e+":"+t+"="+o+i+a+c;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(n.capture){return`(${r})`}if(n.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let h={min:e,max:t,a:l,b:p};let m=[];let g=[];if(d){h.isPadded=d;h.maxLen=String(h.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),h,n);l=h.a=0}if(p>=0){m=splitToPatterns(l,p,h,n)}h.negatives=g;h.positives=m;h.result=collatePatterns(g,m,n);if(n.capture===true){h.result=`(${h.result})`}else if(n.wrap!==false&&m.length+g.length>1){h.result=`(?:${h.result})`}toRegexRange.cache[u]=h;return h.result};function collatePatterns(e,t,r){let s=filterPatterns(e,t,"-",false,r)||[];let n=filterPatterns(t,e,"",false,r)||[];let o=filterPatterns(e,t,"-?",true,r)||[];let i=s.concat(o).concat(n);return i.join("|")}function splitToRanges(e,t){let r=1;let s=1;let n=countNines(e,r);let o=new Set([t]);while(e<=n&&n<=t){o.add(n);r+=1;n=countNines(e,r)}n=countZeros(t+1,s)-1;while(e1){a.count.pop()}a.count.push(c.count[0]);a.string=a.pattern+toQuantifier(a.count);i=t+1;continue}if(r.isPadded){u=padZeros(t,r,s)}c.string=u+c.pattern+toQuantifier(c.count);o.push(c);i=t+1;a=c}return o}function filterPatterns(e,t,r,s,n){let o=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){o.push(r+e)}if(s&&contains(t,"string",e)){o.push(r+e)}}return o}function zip(e,t){let r=[];for(let s=0;st?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},4225:(e,t,r)=>{e.exports=r(4030)},4030:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var c=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}if(a.length>0){l("got illegal response body from proxy");i.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getUserAgent(){if(typeof navigator==="object"&&"userAgent"in navigator){return navigator.userAgent}if(typeof process==="object"&&"version"in process){return`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`}return""}t.getUserAgent=getUserAgent},2937:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var s=r||0;var n=t;return[n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],"-",n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]],n[e[s++]]].join("")}e.exports=bytesToUuid},5403:(e,t,r)=>{var s=r(6113);e.exports=function nodeRNG(){return s.randomBytes(16)}},7191:(e,t,r)=>{var s=r(5403);var n=r(2937);function v4(e,t,r){var o=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var i=e.random||(e.rng||s)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){for(var a=0;a<16;++a){t[o+a]=i[a]}}return t||n(i)}e.exports=v4},7338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return p.default}});var s=_interopRequireDefault(r(6101));var n=_interopRequireDefault(r(9456));var o=_interopRequireDefault(r(1071));var i=_interopRequireDefault(r(8057));var a=_interopRequireDefault(r(7448));var c=_interopRequireDefault(r(5530));var u=_interopRequireDefault(r(324));var l=_interopRequireDefault(r(5284));var p=_interopRequireDefault(r(6067));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},8612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},7448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},6067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},7610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},6750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){s.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},4920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},5284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,s.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},6101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6750));var n=_interopRequireDefault(r(5284));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let i;let a=0;let c=0;function v1(e,t,r){let u=t&&r||0;const l=t||new Array(16);e=e||{};let p=e.node||o;let d=e.clockseq!==undefined?e.clockseq:i;if(p==null||d==null){const t=e.random||(e.rng||s.default)();if(p==null){p=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=i=(t[6]<<8|t[7])&16383}}let h=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:c+1;const g=h-a+(m-c)/1e4;if(g<0&&e.clockseq===undefined){d=d+1&16383}if((g<0||h>a)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=h;c=m;i=d;h+=122192928e5;const E=((h&268435455)*1e4+m)%4294967296;l[u++]=E>>>24&255;l[u++]=E>>>16&255;l[u++]=E>>>8&255;l[u++]=E&255;const v=h/4294967296*1e4&268435455;l[u++]=v>>>8&255;l[u++]=v&255;l[u++]=v>>>24&15|16;l[u++]=v>>>16&255;l[u++]=d>>>8|128;l[u++]=d&255;for(let e=0;e<6;++e){l[u+e]=p[e]}return t||(0,n.default)(l)}var u=v1;t["default"]=u},9456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(9390));var n=_interopRequireDefault(r(8612));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v3",48,n.default);var i=o;t["default"]=i},9390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var s=_interopRequireDefault(r(5284));var n=_interopRequireDefault(r(6067));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6750));var n=_interopRequireDefault(r(5284));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||s.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},8057:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(9390));var n=_interopRequireDefault(r(4920));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v5",80,n.default);var i=o;t["default"]=i},324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(7610));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var n=validate;t["default"]=n},5530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(324));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},666:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{const t=e.assets.find((e=>s.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}})).filter((e=>e&&t?l.satisfies(e.version,t):true))}function filterLatest(e,t){const r=getTargets(t);const s=e.data.map((e=>e.tag_name));const n=l.rsort(s)[0];return e.data.filter((e=>e&&e.tag_name===n)).map((e=>{const t=e.assets.find((e=>r.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}}))}function filterLatestNightly(e,t){const r=getTargets(t);const s=e.data.map((e=>e.published_at));const n=s.sort(((e,t)=>new Date(t).getTime()-new Date(e).getTime()));const o=n[0];p.info(`Try to get latest nightly version published at: ${o}`);return e.data.filter((e=>e&&e.published_at===o)).map((e=>{const t=e.assets.find((e=>r.some((t=>e.name.includes(t)))));if(t){return{version:e.tag_name.replace(/^v/,""),downloadUrl:t.browser_download_url}}}))}function getRelease(e){return i(this,void 0,void 0,(function*(){const{owner:t,name:r,versionSpec:s,checkLatest:n=false,features:o="default"}=e;const i=s==="nightly";const a=new h.Octokit({auth:e.githubToken});return a.paginate(a.repos.listReleases,{owner:t,repo:r},((e,t)=>{const r=i?filterLatestNightly(e,o):[];const a=n?filterLatest(e,o):filterMatch(e,s,o);const c=i?r:a;if(c){t()}return c})).then((e=>{const t=e.find((e=>e!=null));if(t===undefined){if(o==="full"){p.warning('The "full" feature was removed for Nu after v0.93.1, try to use "default" feature instead.')}throw new Error(`No release for Nusehll matching version specifier ${s} of ${o} feature.`)}return t}))}))}function handleBadBinaryPermissions(e,t){return i(this,void 0,void 0,(function*(){const{name:r,bin:s}=e;if(process.platform!=="win32"){const findBin=()=>i(this,void 0,void 0,(function*(){var e,s,n,o;const i=yield m.promises.readdir(t);try{for(var c=true,u=a(i),l;l=yield u.next(),e=l.done,!e;c=true){o=l.value;c=false;const e=o;if(e.toLowerCase()===r.toLowerCase()){return e}}}catch(e){s={error:e}}finally{try{if(!c&&!e&&(n=u.return))yield n.call(u)}finally{if(s)throw s.error}}return r}));const e=c.join(t,s?s:yield findBin());try{yield m.promises.access(e,m.constants.X_OK)}catch(t){yield m.promises.chmod(e,"755");p.debug(`Fixed file permissions (-> 0o755) for ${e}`)}}}))}function checkOrInstallTool(e){return i(this,void 0,void 0,(function*(){const{name:t,versionSpec:r}=e;let s=d.find(t,r||"*");if(!s){const{version:r,downloadUrl:n}=yield getRelease(e);const o=yield d.downloadTool(n);p.debug(`Successfully downloaded ${t} v${r}`);let i;if(n.endsWith(".zip")){i=yield d.extractZip(o)}else{i=yield d.extractTar(o)}p.debug(`Successfully extracted archive for ${t} v${r}`);const a=yield(0,u.globby)([`${i}/**/nu_plugin_*`,c.join(i,"**","nu_plugin_*").replace(/\\/g,"/")],{unique:true,absolute:true});s=yield d.cacheDir(c.dirname(a[0]),t,r);yield handleBadBinaryPermissions(e,s)}const n=c.basename(c.dirname(s));return Object.assign({version:n,dir:s},e)}))}},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")},9945:(e,t,r)=>{"use strict";r.r(t);r.d(t,{convertPathToPattern:()=>L,generateGlobTasks:()=>x,generateGlobTasksSync:()=>G,globby:()=>P,globbyStream:()=>A,globbySync:()=>k,isDynamicPattern:()=>C,isGitIgnored:()=>isGitIgnored,isGitIgnoredSync:()=>isGitIgnoredSync});const s=require("node:process");const n=require("node:fs");const o=require("node:path");const i=require("node:events");const a=require("node:stream");const c=require("node:stream/promises");function mergeStreams(e){if(!Array.isArray(e)){throw new TypeError(`Expected an array, got \`${typeof e}\`.`)}for(const t of e){validateStream(t)}const t=e.some((({readableObjectMode:e})=>e));const r=getHighWaterMark(e,t);const s=new MergedStream({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e){s.add(t)}if(e.length===0){s.end()}return s}const getHighWaterMark=(e,t)=>{if(e.length===0){return 16384}const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class MergedStream extends a.PassThrough{#e=new Set([]);#t=new Set([]);#r;constructor(...e){super(...e);this.#r=onMergedStreamFinished(this,this.#e)}add(e){if(this.#e.has(e)){return}validateStream(e);if(!this.writable){throw new TypeError("The merged stream has already ended.")}this.#e.add(e);endWhenStreamsDone({passThroughStream:this,stream:e,streams:this.#e,ended:this.#t,onFinished:this.#r});updateMaxListeners(this,p);e.pipe(this,{end:false})}remove(e){if(!this.#e.has(e)){throw new TypeError("Stream cannot be removed because it was not piped.")}e.unpipe(this)}}const onMergedStreamFinished=async(e,t)=>{updateMaxListeners(e,l);const r=new AbortController;try{await Promise.race([onMergedStreamEnd(e,r),onInputStreamsUnpipe(e,t,r)])}finally{r.abort();updateMaxListeners(e,-l)}};const onMergedStreamEnd=async(e,{signal:t})=>{try{await(0,c.finished)(e,{signal:t,cleanup:true})}catch{}};const onInputStreamsUnpipe=async(e,t,{signal:r})=>{for await(const[s]of(0,i.on)(e,"unpipe",{signal:r})){if(t.has(s)){s.emit(u)}}};const validateStream=e=>{if(typeof e?.pipe!=="function"){throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)}};const endWhenStreamsDone=async({passThroughStream:e,stream:t,streams:r,ended:s,onFinished:n})=>{try{const o=new AbortController;try{await Promise.race([n,onInputStreamEnd({stream:t,streams:r,ended:s,abortController:o}),onInputStreamUnpipe({passThroughStream:e,stream:t,streams:r,ended:s,abortController:o})])}finally{o.abort()}if(r.size===s.size&&e.writable){e.end()}}catch(t){if(t?.code==="ERR_STREAM_PREMATURE_CLOSE"){e.destroy()}else{e.destroy(t)}}};const onInputStreamEnd=async({stream:e,streams:t,ended:r,abortController:{signal:s}})=>{await(0,c.finished)(e,{signal:s,cleanup:true,readable:true,writable:false});if(t.has(e)){r.add(e)}};const onInputStreamUnpipe=async({passThroughStream:e,stream:t,streams:r,ended:s,abortController:{signal:n}})=>{await(0,i.once)(t,u,{signal:n});r.delete(t);s.delete(t);updateMaxListeners(e,-p)};const u=Symbol("unpipe");const updateMaxListeners=(e,t)=>{e.setMaxListeners(e.getMaxListeners()+t)};const l=2;const p=1;var d=r(6581);var h=r(7147);async function isType(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{const s=await h.promises[e](r);return s[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}function isTypeSync(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{return h[e](r)[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}const m=isType.bind(null,"stat","isFile");const g=isType.bind(null,"stat","isDirectory");const E=isType.bind(null,"lstat","isSymbolicLink");const v=isTypeSync.bind(null,"statSync","isFile");const y=isTypeSync.bind(null,"statSync","isDirectory");const _=isTypeSync.bind(null,"lstatSync","isSymbolicLink");const b=require("node:url");function toPath(e){return e instanceof URL?(0,b.fileURLToPath)(e):e}const w=require("node:fs/promises");var T=r(8829);function slash(e){const t=e.startsWith("\\\\?\\");if(t){return e}return e.replace(/\\/g,"/")}const isNegativePattern=e=>e[0]==="!";const S=["**/node_modules","**/flow-typed","**/coverage","**/.git"];const O={absolute:true,dot:true};const R="**/.gitignore";const applyBaseToPattern=(e,t)=>isNegativePattern(e)?"!"+o.posix.join(t,e.slice(1)):o.posix.join(t,e);const parseIgnoreFile=(e,t)=>{const r=slash(o.relative(t,o.dirname(e.filePath)));return e.content.split(/\r?\n/).filter((e=>e&&!e.startsWith("#"))).map((e=>applyBaseToPattern(e,r)))};const toRelativePath=(e,t)=>{t=slash(t);if(o.isAbsolute(e)){if(slash(e).startsWith(t)){return o.relative(t,e)}throw new Error(`Path ${e} is not in cwd ${t}`)}return e};const getIsIgnoredPredicate=(e,t)=>{const r=e.flatMap((e=>parseIgnoreFile(e,t)));const s=T().add(r);return e=>{e=toPath(e);e=toRelativePath(e,t);return e?s.ignores(slash(e)):false}};const normalizeOptions=(e={})=>({cwd:toPath(e.cwd)??s.cwd(),suppressErrors:Boolean(e.suppressErrors),deep:typeof e.deep==="number"?e.deep:Number.POSITIVE_INFINITY,ignore:[...e.ignore??[],...S]});const isIgnoredByIgnoreFiles=async(e,t)=>{const{cwd:r,suppressErrors:s,deep:n,ignore:o}=normalizeOptions(t);const i=await d(e,{cwd:r,suppressErrors:s,deep:n,ignore:o,...O});const a=await Promise.all(i.map((async e=>({filePath:e,content:await w.readFile(e,"utf8")}))));return getIsIgnoredPredicate(a,r)};const isIgnoredByIgnoreFilesSync=(e,t)=>{const{cwd:r,suppressErrors:s,deep:o,ignore:i}=normalizeOptions(t);const a=d.sync(e,{cwd:r,suppressErrors:s,deep:o,ignore:i,...O});const c=a.map((e=>({filePath:e,content:n.readFileSync(e,"utf8")})));return getIsIgnoredPredicate(c,r)};const isGitIgnored=e=>isIgnoredByIgnoreFiles(R,e);const isGitIgnoredSync=e=>isIgnoredByIgnoreFilesSync(R,e);const assertPatternsInput=e=>{if(e.some((e=>typeof e!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const normalizePathForDirectoryGlob=(e,t)=>{const r=isNegativePattern(e)?e.slice(1):e;return o.isAbsolute(r)?r:o.join(t,r)};const getDirectoryGlob=({directoryPath:e,files:t,extensions:r})=>{const s=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return t?t.map((t=>o.posix.join(e,`**/${o.extname(t)?t:`${t}${s}`}`))):[o.posix.join(e,`**${s?`/*${s}`:""}`)]};const directoryToGlob=async(e,{cwd:t=s.cwd(),files:r,extensions:n}={})=>{const o=await Promise.all(e.map((async e=>await g(normalizePathForDirectoryGlob(e,t))?getDirectoryGlob({directoryPath:e,files:r,extensions:n}):e)));return o.flat()};const directoryToGlobSync=(e,{cwd:t=s.cwd(),files:r,extensions:n}={})=>e.flatMap((e=>y(normalizePathForDirectoryGlob(e,t))?getDirectoryGlob({directoryPath:e,files:r,extensions:n}):e));const toPatternsArray=e=>{e=[...new Set([e].flat())];assertPatternsInput(e);return e};const checkCwdOption=e=>{if(!e){return}let t;try{t=n.statSync(e)}catch{return}if(!t.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(e={})=>{e={...e,ignore:e.ignore??[],expandDirectories:e.expandDirectories??true,cwd:toPath(e.cwd)};checkCwdOption(e.cwd);return e};const normalizeArguments=e=>async(t,r)=>e(toPatternsArray(t),globby_normalizeOptions(r));const normalizeArgumentsSync=e=>(t,r)=>e(toPatternsArray(t),globby_normalizeOptions(r));const getIgnoreFilesPatterns=e=>{const{ignoreFiles:t,gitignore:r}=e;const s=t?toPatternsArray(t):[];if(r){s.push(R)}return s};const getFilter=async e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&await isIgnoredByIgnoreFiles(t,e))};const getFilterSync=e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&isIgnoredByIgnoreFilesSync(t,e))};const createFilterFunction=e=>{const t=new Set;return r=>{const s=o.normalize(r.path??r);if(t.has(s)||e&&e(s)){return false}t.add(s);return true}};const unionFastGlobResults=(e,t)=>e.flat().filter((e=>t(e)));const convertNegativePatterns=(e,t)=>{const r=[];while(e.length>0){const s=e.findIndex((e=>isNegativePattern(e)));if(s===-1){r.push({patterns:e,options:t});break}const n=e[s].slice(1);for(const e of r){e.options.ignore.push(n)}if(s!==0){r.push({patterns:e.slice(0,s),options:{...t,ignore:[...t.ignore,n]}})}e=e.slice(s+1)}return r};const normalizeExpandDirectoriesOption=(e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e});const generateTasks=async(e,t)=>{const r=convertNegativePatterns(e,t);const{cwd:s,expandDirectories:n}=t;if(!n){return r}const o=normalizeExpandDirectoriesOption(n,s);return Promise.all(r.map((async e=>{let{patterns:t,options:r}=e;[t,r.ignore]=await Promise.all([directoryToGlob(t,o),directoryToGlob(r.ignore,{cwd:s})]);return{patterns:t,options:r}})))};const generateTasksSync=(e,t)=>{const r=convertNegativePatterns(e,t);const{cwd:s,expandDirectories:n}=t;if(!n){return r}const o=normalizeExpandDirectoriesOption(n,s);return r.map((e=>{let{patterns:t,options:r}=e;t=directoryToGlobSync(t,o);r.ignore=directoryToGlobSync(r.ignore,{cwd:s});return{patterns:t,options:r}}))};const P=normalizeArguments((async(e,t)=>{const[r,s]=await Promise.all([generateTasks(e,t),getFilter(t)]);const n=await Promise.all(r.map((e=>d(e.patterns,e.options))));return unionFastGlobResults(n,s)}));const k=normalizeArgumentsSync(((e,t)=>{const r=generateTasksSync(e,t);const s=getFilterSync(t);const n=r.map((e=>d.sync(e.patterns,e.options)));return unionFastGlobResults(n,s)}));const A=normalizeArgumentsSync(((e,t)=>{const r=generateTasksSync(e,t);const s=getFilterSync(t);const n=r.map((e=>d.stream(e.patterns,e.options)));const o=mergeStreams(n).filter((e=>s(e)));return o}));const C=normalizeArgumentsSync(((e,t)=>e.some((e=>d.isDynamicPattern(e,t)))));const x=normalizeArguments(generateTasks);const G=normalizeArgumentsSync(generateTasksSync);const{convertPathToPattern:L}=d}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={id:r,loaded:false,exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(2694);module.exports=r})(); \ No newline at end of file diff --git a/src/plugins.ts b/src/plugins.ts index d39df6b..00117de 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -10,9 +10,9 @@ export async function registerPlugins(enablePlugins: string, version: string) { const LEGACY_VERSION = '0.92.3'; const nuBin = shell.which('nu'); console.log('Nu binary path:', nuBin); - const nuDir = nuBin ? path.dirname(nuBin) : ''; + const nuDir = nuBin ? path.dirname(nuBin.toString()) : ''; console.log('Nu dir contents:', shell.ls(nuDir)); - const plugins = await globby(`${nuBin}_plugins_*`, { absolute: true, unique: true }); + const plugins = await globby(`${nuBin?.toString()}_plugins_*`, { absolute: true, unique: true }); console.log('Plugins:', plugins); if (!version.includes('nightly') && semver.lte(version, LEGACY_VERSION)) { console.log('Register plugins by `register` command');