@keload/node-red-dxp 1.22.0 → 1.23.0
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/README.md
CHANGED
|
@@ -47,6 +47,7 @@ With **node-red-dxp**, you get everything you need to build, style, and document
|
|
|
47
47
|
|
|
48
48
|
- [node-red-contrib-ultimate-toolkit](https://www.npmjs.com/package/@keload/node-red-contrib-ultimate-toolkit)️
|
|
49
49
|
- [node-red-contrib-js-philips-tv-control](https://www.npmjs.com/package/@keload/node-red-contrib-js-philips-tv-control)
|
|
50
|
+
- [node-red-contrib-happy-http-client](https://www.npmjs.com/package/@keload/node-red-contrib-happy-http-client) 🏗️
|
|
50
51
|
- [node-red-contrib-better-webdav](https://www.npmjs.com/package/@keload/node-red-contrib-better-webdav) 🏗️
|
|
51
52
|
|
|
52
53
|
## License
|
package/dist/cli/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
${t}`,Cu=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),hu=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Eu=(e,t,u)=>{let r=u===""?"":`with ${u.trim()}() `,o=pu.bind(null,r,t.toString());Object.defineProperty(o,"name",hu);let{writable:s,enumerable:i,configurable:n}=Cu;Object.defineProperty(e,"toString",{value:o,writable:s,enumerable:i,configurable:n});};function se(e,t,{ignoreNonConfigurable:u=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))mu(e,t,o,u);return fu(e,t),Eu(e,t,r),e}var W=new WeakMap,We=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let u,r=0,o=e.displayName||e.name||"<anonymous>",s=function(...i){if(W.set(s,++r),r===1)u=e.apply(this,i),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return u};return se(s,e),W.set(s,r),s};We.callCount=e=>{if(!W.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return W.get(e)};var He=We;var x=[];x.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&x.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&x.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var H=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ie=Symbol.for("signal-exit emitter"),ne=globalThis,gu=Object.defineProperty.bind(Object),De=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ne[ie])return ne[ie];gu(ne,ie,{value:this,writable:!1,enumerable:!1,configurable:!1});}on(t,u){this.listeners[t].push(u);}removeListener(t,u){let r=this.listeners[t],o=r.indexOf(u);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1));}emit(t,u,r){if(this.emitted[t])return !1;this.emitted[t]=!0;let o=!1;for(let s of this.listeners[t])o=s(u,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",u,r)||o),o}},U=class{},Bu=e=>({onExit(t,u){return e.onExit(t,u)},load(){return e.load()},unload(){return e.unload()}}),ae=class extends U{onExit(){return ()=>{}}load(){}unload(){}},le=class extends U{#i=Fe.platform==="win32"?"SIGINT":"SIGHUP";#u=new De;#e;#o;#c;#t={};#s=!1;constructor(t){super(),this.#e=t,this.#t={};for(let u of x)this.#t[u]=()=>{let r=this.#e.listeners(u),{count:o}=this.#u,s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(o+=s.__signal_exit_emitter__.count),r.length===o){this.unload();let i=this.#u.emit("exit",null,u),n=u==="SIGHUP"?this.#i:u;i||t.kill(t.pid,n);}};this.#c=t.reallyExit,this.#o=t.emit;}onExit(t,u){if(!H(this.#e))return ()=>{};this.#s===!1&&this.load();let r=u!=null&&u.alwaysLast?"afterExit":"exit";return this.#u.on(r,t),()=>{this.#u.removeListener(r,t),this.#u.listeners.exit.length===0&&this.#u.listeners.afterExit.length===0&&this.unload();}}load(){if(!this.#s){this.#s=!0,this.#u.count+=1;for(let t of x)try{let u=this.#t[t];u&&this.#e.on(t,u);}catch{}this.#e.emit=(t,...u)=>this.#m(t,...u),this.#e.reallyExit=t=>this.#r(t);}}unload(){this.#s&&(this.#s=!1,x.forEach(t=>{let u=this.#t[t];if(!u)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,u);}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#c,this.#u.count-=1);}#r(t){return H(this.#e)?(this.#e.exitCode=t||0,this.#u.emit("exit",this.#e.exitCode,null),this.#c.call(this.#e,this.#e.exitCode)):0}#m(t,...u){let r=this.#o;if(t==="exit"&&H(this.#e)){typeof u[0]=="number"&&(this.#e.exitCode=u[0]);let o=r.call(this.#e,t,...u);return this.#u.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...u)}},Fe=globalThis.process,{onExit:Ue,load:go,unload:Bo}=Bu(H(Fe)?new le(Fe):new ae);var Ye=h__namespace.default.stderr.isTTY?h__namespace.default.stderr:h__namespace.default.stdout.isTTY?h__namespace.default.stdout:void 0,_u=Ye?He(()=>{Ue(()=>{Ye.write("\x1B[?25h");},{alwaysLast:!0});}):()=>{},qe=_u;var q=!1,v={};v.show=(e=h__namespace.default.stderr)=>{e.isTTY&&(q=!1,e.write("\x1B[?25h"));};v.hide=(e=h__namespace.default.stderr)=>{e.isTTY&&(qe(),q=!0,e.write("\x1B[?25l"));};v.toggle=(e,t)=>{e!==void 0&&(q=e),q?v.show(t):v.hide(t);};var ce=v;var M=Pe(me());function de(){return h__namespace.default.platform!=="win32"?h__namespace.default.env.TERM!=="linux":!!h__namespace.default.env.CI||!!h__namespace.default.env.WT_SESSION||!!h__namespace.default.env.TERMINUS_SUBLIME||h__namespace.default.env.ConEmuTask==="{cmd::Cmder}"||h__namespace.default.env.TERM_PROGRAM==="Terminus-Sublime"||h__namespace.default.env.TERM_PROGRAM==="vscode"||h__namespace.default.env.TERM==="xterm-256color"||h__namespace.default.env.TERM==="alacritty"||h__namespace.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var xu={info:C.blue("\u2139"),success:C.green("\u2714"),warning:C.yellow("\u26A0"),error:C.red("\u2716")},bu={info:C.blue("i"),success:C.green("\u221A"),warning:C.yellow("\u203C"),error:C.red("\xD7")},Au=de()?xu:bu,R=Au;function fe({onlyFirst:e=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,e?void 0:"g")}var wu=fe();function j(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(wu,"")}function Ze(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Xe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Qe(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Nu(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function et(e,{ambiguousAsWide:t=!1}={}){return Nu(e),Xe(e)||Qe(e)||t&&Ze(e)?2:1}var tt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var vu=new Intl.Segmenter,Pu=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function pe(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=j(e)),e.length===0)return 0;let o=0,s={ambiguousAsWide:!u};for(let{segment:i}of vu.segment(e)){let n=i.codePointAt(0);if(!(n<=31||n>=127&&n<=159)&&!(n>=8203&&n<=8207||n===65279)&&!(n>=768&&n<=879||n>=6832&&n<=6911||n>=7616&&n<=7679||n>=8400&&n<=8447||n>=65056&&n<=65071)&&!(n>=55296&&n<=57343)&&!(n>=65024&&n<=65039)&&!Pu.test(i)){if(tt().test(i)){o+=2;continue}o+=et(n,s);}}return o}function Ce({stream:e=process.stdout}={}){return !!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function he(){let{env:e}=h__namespace.default,{TERM:t,TERM_PROGRAM:u}=e;return h__namespace.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||u==="Terminus-Sublime"||u==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Su=3,Ee=class{#i=0;start(){this.#i++,this.#i===1&&this.#u();}stop(){if(this.#i<=0)throw new Error("`stop` called more times than `start`");this.#i--,this.#i===0&&this.#e();}#u(){h__namespace.default.platform==="win32"||!h__namespace.default.stdin.isTTY||(h__namespace.default.stdin.setRawMode(!0),h__namespace.default.stdin.on("data",this.#o),h__namespace.default.stdin.resume());}#e(){h__namespace.default.stdin.isTTY&&(h__namespace.default.stdin.off("data",this.#o),h__namespace.default.stdin.pause(),h__namespace.default.stdin.setRawMode(!1));}#o(t){t[0]===Su&&h__namespace.default.emit("SIGINT");}},Tu=new Ee,ge=Tu;Pe(me());var Be=class{#i=0;#u=!1;#e=0;#o=-1;#c=0;#t;#s;#r;#m;#f;#a;#l;#F;#p;#n;#D;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:h__namespace.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#f=this.#t.interval,this.#r=this.#t.stream,this.#a=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Ce({stream:this.#r}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,h__namespace.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#a,Object.defineProperty(this,"_linesToClear",{get(){return this.#i},set(u){this.#i=u;}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}));}get indent(){return this.#F}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#F=t,this.#d();}get interval(){return this.#f??this.#s.interval??100}get spinner(){return this.#s}set spinner(t){if(this.#o=-1,this.#f=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#s=t;}else if(!he())this.#s=M.default.line;else if(t===void 0)this.#s=M.default.dots;else if(t!=="default"&&M.default[t])this.#s=M.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(t=""){this.#p=t,this.#d();}get prefixText(){return this.#n}set prefixText(t=""){this.#n=t,this.#d();}get suffixText(){return this.#D}set suffixText(t=""){this.#D=t,this.#d();}get isSpinning(){return this.#m!==void 0}#C(t=this.#n,u=" "){return typeof t=="string"&&t!==""?t+u:typeof t=="function"?t()+u:""}#h(t=this.#D,u=" "){return typeof t=="string"&&t!==""?u+t:typeof t=="function"?u+t():""}#d(){let t=this.#r.columns??80,u=this.#C(this.#n,"-"),r=this.#h(this.#D,"-"),o=" ".repeat(this.#F)+u+"--"+this.#p+"--"+r;this.#e=0;for(let s of j(o).split(`
|
|
8
8
|
`))this.#e+=Math.max(1,Math.ceil(pe(s,{countAnsiEscapeCodes:!0})/t));}get isEnabled(){return this.#a&&!this.#l}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#a=t;}get isSilent(){return this.#l}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=t;}frame(){let t=Date.now();(this.#o===-1||t-this.#c>=this.interval)&&(this.#o=++this.#o%this.#s.frames.length,this.#c=t);let{frames:u}=this.#s,r=u[this.#o];this.color&&(r=C[this.color](r));let o=typeof this.#n=="string"&&this.#n!==""?this.#n+" ":"",s=typeof this.text=="string"?" "+this.text:"",i=typeof this.#D=="string"&&this.#D!==""?" "+this.#D:"";return o+r+s+i}clear(){if(!this.#a||!this.#r.isTTY)return this;this.#r.cursorTo(0);for(let t=0;t<this.#i;t++)t>0&&this.#r.moveCursor(0,-1),this.#r.clearLine(1);return (this.#F||this.lastIndent!==this.#F)&&this.#r.cursorTo(this.#F),this.lastIndent=this.#F,this.#i=0,this}render(){return this.#l?this:(this.clear(),this.#r.write(this.frame()),this.#i=this.#e,this)}start(t){return t&&(this.text=t),this.#l?this:this.#a?this.isSpinning?this:(this.#t.hideCursor&&ce.hide(this.#r),this.#t.discardStdin&&h__namespace.default.stdin.isTTY&&(this.#u=!0,ge.start()),this.render(),this.#m=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#r.write(`- ${this.text}
|
|
9
9
|
`),this)}stop(){return this.#a?(clearInterval(this.#m),this.#m=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&ce.show(this.#r),this.#t.discardStdin&&h__namespace.default.stdin.isTTY&&this.#u&&(ge.stop(),this.#u=!1),this):this}succeed(t){return this.stopAndPersist({symbol:R.success,text:t})}fail(t){return this.stopAndPersist({symbol:R.error,text:t})}warn(t){return this.stopAndPersist({symbol:R.warning,text:t})}info(t){return this.stopAndPersist({symbol:R.info,text:t})}stopAndPersist(t={}){if(this.#l)return this;let u=t.prefixText??this.#n,r=this.#C(u," "),o=t.symbol??" ",s=t.text??this.text,n=typeof s=="string"?(o?" ":"")+s:"",l=t.suffixText??this.#D,m=this.#h(l," "),d=r+o+n+m+`
|
|
10
|
-
`;return this.stop(),this.#r.write(d),this}};function _e(e){return new Be(e)}var rt={name:"@keload/node-red-dxp",version:"1.
|
|
10
|
+
`;return this.stop(),this.#r.write(d),this}};function _e(e){return new Be(e)}var rt={name:"@keload/node-red-dxp",version:"1.22.0",description:"",type:"module",scripts:{build:"tsup",watch:"tsup --watch",format:"pnpm biome format",lint:"pnpm biome lint","lint:check":"pnpm biome check",release:"pnpm release-it","release:test":"pnpm release-it --dry-run","docs:dev":"./build-docs.sh && vitepress dev docs","docs:build":"./build-docs.sh && vitepress build docs","docs:preview":"vitepress preview docs","test:unit":"vitest"},publishConfig:{access:"public"},bin:{"node-red-dxp":"./dist/cli/index.cjs"},exports:{".":{import:"./dist/index.js",require:"./dist/index.cjs"},"./editor":{import:"./dist/editor/index.js",require:"./dist/editor/index.cjs"},"./editor/dom-helper":{import:"./dist/editor/dom-helper/index.js",require:"./dist/editor/dom-helper/index.cjs"},"./builder":{import:"./dist/builder/index.js",require:"./dist/builder/index.cjs"},"./utils":{import:"./dist/utils/index.js",require:"./dist/utils/index.cjs"},"./utils/controller":{import:"./dist/utils/controller.js",require:"./dist/utils/controller.cjs"},"./package.json":"./package.json"},keywords:[],author:"Cl\xE9ment BERARD <contact@berard.dev>",license:"MIT",repository:{type:"git",url:"https://github.com/clement-berard/node-red-dxp.git"},bugs:{url:"https://github.com/clement-berard/node-red-dxp/issues"},homepage:"https://github.com/clement-berard/node-red-dxp",devDependencies:{"@biomejs/biome":"1.9.4","@release-it/conventional-changelog":"10.0.0","release-it":"18.1.1",tsup:"8.3.5",tsx:"4.19.2",typedoc:"0.27.6","typedoc-plugin-markdown":"4.4.1",typescript:"5.7.3",vitepress:"1.5.0","vitepress-plugin-npm-commands":"^0.6.0","vitepress-plugin-tabs":"^0.5.0",vitest:"2.1.8"},dependencies:{"@fullhuman/postcss-purgecss":"7.0.2","@types/html-minifier-terser":"7.0.2","@types/jquery":"3.5.32","@types/jqueryui":"1.12.23","@types/node-red":"1.3.5","@types/prettyjson":"0.0.33",autoprefixer:"10.4.20","browser-sync":"3.0.3",chokidar:"4.0.3",commander:"13.1.0",consola:"3.3.3",cosmiconfig:"9.0.0",cssnano:"7.0.6",esbuild:"0.24.2","fast-glob":"3.3.3",handlebars:"4.7.8","html-minifier-terser":"7.2.0","mdx-to-md":"0.3.2","merge-anything":"6.0.2",nodemon:"3.1.9",ora:"8.1.1",postcss:"8.5.1",prettyjson:"1.2.5",pug:"3.0.3",radash:"12.1.0",sass:"1.83.1",tailwindcss:"3.4.17"},files:["dist"]};function K(e){return Object.prototype.toString.call(e).slice(8,-1)}function P(e){if(K(e)!=="Object")return !1;let t=Object.getPrototypeOf(e);return !!t&&t.constructor===Object&&t===Object.prototype}function z(e){return K(e)==="Symbol"}function ot(e,t,u,r){let o={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=u),o==="nonenumerable"&&Object.defineProperty(e,t,{value:u,enumerable:!1,writable:!0,configurable:!0});}function st(e,t,u){if(!P(t))return t;let r={};if(P(e)){let n=Object.getOwnPropertyNames(e),l=Object.getOwnPropertySymbols(e);r=[...n,...l].reduce((m,d)=>{let y=e[d];return (!z(d)&&!Object.getOwnPropertyNames(t).includes(d)||z(d)&&!Object.getOwnPropertySymbols(t).includes(d))&&ot(m,d,y,e),m},{});}let o=Object.getOwnPropertyNames(t),s=Object.getOwnPropertySymbols(t);return [...o,...s].reduce((n,l)=>{let m=t[l],d=P(e)?e[l]:void 0;d!==void 0&&P(m)&&(m=st(d,m));let y=m;return ot(n,l,y,t),n},r)}function Z(e,...t){return t.reduce((u,r)=>st(u,r),e)}var it={builder:{outputDir:"dist",esbuildControllerOptions:{includeInBundle:[]},tailwind:{forcedClassesInclusion:[]},editor:{webComponents:{formRow:!1}}},watcher:{nodeRed:{enabled:!0,path:"~/.node-red",url:"http://localhost:1880"}}};var a={libCacheDir:".node-red-dxp",srcDir:"src",nodesDirName:"nodes",localesDirName:"locales",globalStylesName:"styles",nodes:{controllerName:"controller",editor:{dirName:"editor",htmlName:"index",stylesName:"styles",tsName:"index"}}};var Lu="node-red-dxp",Gu=e=>e.replace("@","").replace("/","-");function Wu(){let e=cosmiconfig.cosmiconfigSync(Lu);try{let t=e.search();return Z(it,t?t.config:{})}catch(t){throw console.error("Error while loading configuration",t),t}}var nt=Wu(),B=process.cwd(),Dt=JSON.parse(lt.readFileSync(`${B}/package.json`,"utf-8")),k=`${B}/${a.srcDir}`,Hu=`${B}/resources`,Uu=`${B}/resources`,ye=`${k}/${a.nodesDirName}`,xe=`${B}/${a.libCacheDir}`,Yu=`${Ft__namespace.default.resolve(__dirname,"..")}`,at=Gu(Dt.name);function qu(e=[]){return e.map(t=>{let u=t.path,r=`${u}/${a.nodes.editor.dirName}`,o=u.replace(B,"").slice(1),s=`${o}/${a.nodes.editor.dirName}`,i=fastGlob.globSync(`${r}/${a.nodes.editor.stylesName}.scss`),n=fastGlob.globSync(`${u}/docs.mdx`),l=fastGlob.globSync(`${u}/docs.md`),m=radash.dash(t.name);return {fullEditorPath:r,fullPath:u,name:t.name,pascalName:radash.pascal(t.name),dashName:m,relativeEditorPath:s,relativePath:o,nodeIdentifier:`${at}-${m}`,fullControllerPath:`${u}/${a.nodes.controllerName}.ts`,editor:{tsPath:`${r}/${a.nodes.editor.tsName}.ts`,htmlPath:`${r}/${a.nodes.editor.htmlName}.html`,pugPath:`${r}/${a.nodes.editor.htmlName}.pug`,scssFiles:i},doc:{mdxFiles:n,mdFiles:l}}})}function Ju(){let e=fastGlob.globSync(`${ye}/**/*`,{onlyDirectories:!0,deep:1,objectMode:!0}),t=qu(e),u=t.map(r=>r.name);return {currentDir:B,pathSrcDir:k,pathSrcNodesDir:ye,pathResourcesDir:Hu,additionalResourcesDir:Uu,pathDist:`${B}/${nt.builder.outputDir}`,currentPackagedDistPath:Yu,cacheDirFiles:{controllerIndex:`${xe}/controller-index.ts`,editorIndex:`${xe}/editor-index.ts`},pathLibCacheDir:xe,packageName:Dt.name,packageNameSlug:at,config:nt,resolvedSrcPathsScss:fastGlob.globSync(`${k}/${a.globalStylesName}.scss`,{ignore:[`${ye}/**/*.scss`]}),resolvedNodesPaths:e.map(r=>r.path),resolvedSrcLocalesPaths:fastGlob.globSync(`${k}/${a.localesDirName}/*.json`),redServerPath:fastGlob.globSync(`${k}/red-server.ts`),listNodesFull:t,listNodesFullNames:u}}var D=Ju();var ct=`${Ft__namespace.default.resolve(__dirname,"..")}`;function A(e){lt__default.default.existsSync(e)||lt__default.default.mkdirSync(e,{recursive:!0});}async function E(e,t){try{await be__default.default.writeFile(e,t);}catch(u){console.error("Error writing controller index:",u);}}async function mt(e){for(let t of e)try{let u=Ft__namespace.default.resolve(t),r=await be__default.default.stat(u).catch(()=>null);r!=null&&r.isDirectory()&&await be__default.default.rm(u,{recursive:!0,force:!0});}catch(u){console.error(`Error cleaning path (${t}): ${u}`);}}var dt={name:"add-credentials-export",setup(e){e.onLoad({filter:/controller\.ts$/},async t=>{let u=await be__default.default.readFile(t.path,"utf8");return /export\s+const\s+credentials\s*=/.test(u)?{contents:u,loader:"ts"}:{contents:`${u}
|
|
11
11
|
export const credentials = {};`,loader:"ts"}});}};var Zu=`${D.currentDir}/package.json`,X=class{params;constructor(t){this.params={minify:!1,...t};}async getControllerIndexContent(){return `
|
|
12
12
|
import type { NodeAPI } from 'node-red';
|
|
13
13
|
${D.listNodesFull.map(t=>`// @ts-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var l=e=>{if(!e||e.length===0)return "";let t=e.toLowerCase();return t.substring(0,1).toUpperCase()+t.substring(1,t.length)};var a=(e,t)=>{var o;let r=(o=e==null?void 0:e.replace(/([A-Z])+/g,l).split(/(?=[A-Z])|[\.\-\s_]/).map(i=>i.toLowerCase()))!=null?o:[];if(r.length===0)return "";if(r.length===1)return r[0];let n=r.reduce((i,c)=>`${i}_${c.toLowerCase()}`);return (t==null?void 0:t.splitOnNumber)===!1?n:n.replace(/([A-Za-z]{1}[0-9]{1})/,i=>`${i[0]}_${i[1]}`)};function p(e){let t=e.startsWith("$"),r=e.startsWith("$$"),n=e.startsWith("#node-config-input")||e.startsWith("#node-input");return {isNodeIdShortcut:t,isNodeConfigIdShortcut:r,isFullSelector:n,value:t||r||n}}function s(e){let t=p(e);return t.isNodeConfigIdShortcut?`#node-config-input-${e.replace("$$","")}`:t.isNodeIdShortcut?`#node-input-${e.replace("$","")}`:e}function u(e,t,r){t.forEach(n=>{let o=document.querySelector(n);o&&r.forEach(i=>o.classList[e](i));});}function C(e,t){u("remove",e,t);}function E(e,t){u("add",e,t);}function A(e){return s(e).split("-input-")[1]}function I(e,t,r){let n=s(e),o=t;r!=null&&r.emptyValue&&(o=[{value:"",text:r.emptyValue},...t]),$(n).empty().append(o.map(i=>$("<option>",{value:i.value,text:i.text,selected:i.value===(r==null?void 0:r.selected)})));}function T(e,t,r={additionalEvents:[]}){let o=(Array.isArray(e)?e:[e]).map(s).join(", "),i=["input",...r.additionalEvents];$(o).on(i.join(" "),()=>{let c=$(o).map(function(){return $(this).val()}).get();t(c);});}function k(e,t){let r=s(e);$(r).val(t);}function L(e,t){let r=s(e);$(r).text(t);}function w(e){let t=s(e);return $(t)}function j(e){let t=s(e);return document.querySelector(t).checked}function O(e){let t={};return document.querySelectorAll(`[id^="node-input-${e}-"]`).forEach(r=>{let n=r,o=n.id.replace(`node-input-${e}-`,"");n.type==="checkbox"?t[o]=n.checked:t[o]=n.value;}),t}function H(e,t){t&&Object.entries(t).forEach(([r,n])=>{let o=document.querySelector(`#node-input-${e}-${r}`);o&&(o.type==="checkbox"?o.checked=!!n:o.value=String(n));});}function R(e){let t=`#tabs-content-${e.targetId}`,r=RED.tabs.create({id:e.targetId,onchange:n=>{$(t).children().addClass("hidden"),$(`#${n.id}`).removeClass("hidden");}});(e.tabsLabel||[]).forEach(n=>{r.addTab({id:`tab-${a(n)}`,label:n});}),r.activateTab(`tab-${a(e.initialTab)}`);}exports.addClassesOnSelectors=E;exports.getFormValues=O;exports.handleAddRemoveClassesOnSelectors=u;exports.initSelect=I;exports.initTabs=R;exports.isCheckboxChecked=j;exports.isNodeInput=p;exports.jqSelector=w;exports.removeClassesOnSelectors=C;exports.resolveInputKey=A;exports.resolveSelector=s;exports.setFormValues=H;exports.setInputValue=k;exports.setText=L;exports.watchInput=T;
|
|
@@ -121,11 +121,14 @@ declare function initSelect(selector: string, options: Record<string, string>[],
|
|
|
121
121
|
* @param selectors - A single selector string or an array of selector strings.
|
|
122
122
|
* @param callback - A function to call with the updated values of the inputs.
|
|
123
123
|
*
|
|
124
|
+
* @param opt
|
|
124
125
|
* @example
|
|
125
126
|
* watchInput('$input-id', (values) => console.log(values));
|
|
126
127
|
* watchInput(['$input-1', '$input-2'], (values) => console.log(values));
|
|
127
128
|
*/
|
|
128
|
-
declare function watchInput<T = any>(selectors: string | string[], callback: (values: T[]) => void
|
|
129
|
+
declare function watchInput<T = any>(selectors: string | string[], callback: (values: T[]) => void, opt?: {
|
|
130
|
+
additionalEvents: any[];
|
|
131
|
+
}): void;
|
|
129
132
|
/**
|
|
130
133
|
* Sets the value of an input element.
|
|
131
134
|
*
|
|
@@ -121,11 +121,14 @@ declare function initSelect(selector: string, options: Record<string, string>[],
|
|
|
121
121
|
* @param selectors - A single selector string or an array of selector strings.
|
|
122
122
|
* @param callback - A function to call with the updated values of the inputs.
|
|
123
123
|
*
|
|
124
|
+
* @param opt
|
|
124
125
|
* @example
|
|
125
126
|
* watchInput('$input-id', (values) => console.log(values));
|
|
126
127
|
* watchInput(['$input-1', '$input-2'], (values) => console.log(values));
|
|
127
128
|
*/
|
|
128
|
-
declare function watchInput<T = any>(selectors: string | string[], callback: (values: T[]) => void
|
|
129
|
+
declare function watchInput<T = any>(selectors: string | string[], callback: (values: T[]) => void, opt?: {
|
|
130
|
+
additionalEvents: any[];
|
|
131
|
+
}): void;
|
|
129
132
|
/**
|
|
130
133
|
* Sets the value of an input element.
|
|
131
134
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../../chunk-Z65JVQED.js';import {c}from'../../chunk-O55HBSM5.js';import'../../chunk-O2XFH626.js';function
|
|
1
|
+
import'../../chunk-Z65JVQED.js';import {c}from'../../chunk-O55HBSM5.js';import'../../chunk-O2XFH626.js';function u(t){let e=t.startsWith("$"),n=t.startsWith("$$"),o=t.startsWith("#node-config-input")||t.startsWith("#node-input");return {isNodeIdShortcut:e,isNodeConfigIdShortcut:n,isFullSelector:o,value:e||n||o}}function s(t){let e=u(t);return e.isNodeConfigIdShortcut?`#node-config-input-${t.replace("$$","")}`:e.isNodeIdShortcut?`#node-input-${t.replace("$","")}`:t}function l(t,e,n){e.forEach(o=>{let r=document.querySelector(o);r&&n.forEach(i=>r.classList[t](i));});}function g(t,e){l("remove",t,e);}function p(t,e){l("add",t,e);}function f(t){return s(t).split("-input-")[1]}function h(t,e,n){let o=s(t),r=e;n!=null&&n.emptyValue&&(r=[{value:"",text:n.emptyValue},...e]),$(o).empty().append(r.map(i=>$("<option>",{value:i.value,text:i.text,selected:i.value===(n==null?void 0:n.selected)})));}function b(t,e,n={additionalEvents:[]}){let r=(Array.isArray(t)?t:[t]).map(s).join(", "),i=["input",...n.additionalEvents];$(r).on(i.join(" "),()=>{let a=$(r).map(function(){return $(this).val()}).get();e(a);});}function m(t,e){let n=s(t);$(n).val(e);}function x(t,e){let n=s(t);$(n).text(e);}function S(t){let e=s(t);return $(e)}function v(t){let e=s(t);return document.querySelector(e).checked}function y(t){let e={};return document.querySelectorAll(`[id^="node-input-${t}-"]`).forEach(n=>{let o=n,r=o.id.replace(`node-input-${t}-`,"");o.type==="checkbox"?e[r]=o.checked:e[r]=o.value;}),e}function I(t,e){e&&Object.entries(e).forEach(([n,o])=>{let r=document.querySelector(`#node-input-${t}-${n}`);r&&(r.type==="checkbox"?r.checked=!!o:r.value=String(o));});}function E(t){let e=`#tabs-content-${t.targetId}`,n=RED.tabs.create({id:t.targetId,onchange:o=>{$(e).children().addClass("hidden"),$(`#${o.id}`).removeClass("hidden");}});(t.tabsLabel||[]).forEach(o=>{n.addTab({id:`tab-${c(o)}`,label:o});}),n.activateTab(`tab-${c(t.initialTab)}`);}export{p as addClassesOnSelectors,y as getFormValues,l as handleAddRemoveClassesOnSelectors,h as initSelect,E as initTabs,v as isCheckboxChecked,u as isNodeInput,S as jqSelector,g as removeClassesOnSelectors,f as resolveInputKey,s as resolveSelector,I as setFormValues,m as setInputValue,x as setText,b as watchInput};
|