@soybeanjs/cli 0.8.0 → 0.8.1

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.
@@ -0,0 +1,5 @@
1
+ "use strict";const process$2=require("node:process"),index=require("./index.cjs"),require$$0=require("assert"),EventEmitter=require("events"),index$2=require("./index4.cjs"),index$1=require("../shared/cli.6ba50424.cjs");require("tty"),require("util"),require("os"),require("node:util"),require("string_decoder"),require("stream"),require("crypto"),require("node:path"),require("execa"),require("path"),require("node:os"),require("node:stream"),require("node:fs/promises"),require("child_process"),require("node:url"),require("node:module"),require("node:fs");function _interopDefaultCompat(e){return e&&typeof e=="object"&&"default"in e?e.default:e}const process__default=_interopDefaultCompat(process$2),require$$0__default=_interopDefaultCompat(require$$0),EventEmitter__default=_interopDefaultCompat(EventEmitter),ESC="\x1B[",OSC="\x1B]",BEL="\x07",SEP=";",isBrowser=typeof window<"u"&&typeof window.document<"u",isTerminalApp=!isBrowser&&process__default.env.TERM_PROGRAM==="Apple_Terminal",isWindows=!isBrowser&&process__default.platform==="win32",cwdFunction=isBrowser?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:process__default.cwd,ansiEscapes={};ansiEscapes.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?ESC+(e+1)+"G":ESC+(t+1)+SEP+(e+1)+"H"},ansiEscapes.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=ESC+-e+"D":e>0&&(r+=ESC+e+"C"),t<0?r+=ESC+-t+"A":t>0&&(r+=ESC+t+"B"),r},ansiEscapes.cursorUp=(e=1)=>ESC+e+"A",ansiEscapes.cursorDown=(e=1)=>ESC+e+"B",ansiEscapes.cursorForward=(e=1)=>ESC+e+"C",ansiEscapes.cursorBackward=(e=1)=>ESC+e+"D",ansiEscapes.cursorLeft=ESC+"G",ansiEscapes.cursorSavePosition=isTerminalApp?"\x1B7":ESC+"s",ansiEscapes.cursorRestorePosition=isTerminalApp?"\x1B8":ESC+"u",ansiEscapes.cursorGetPosition=ESC+"6n",ansiEscapes.cursorNextLine=ESC+"E",ansiEscapes.cursorPrevLine=ESC+"F",ansiEscapes.cursorHide=ESC+"?25l",ansiEscapes.cursorShow=ESC+"?25h",ansiEscapes.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=ansiEscapes.eraseLine+(r<e-1?ansiEscapes.cursorUp():"");return e&&(t+=ansiEscapes.cursorLeft),t},ansiEscapes.eraseEndLine=ESC+"K",ansiEscapes.eraseStartLine=ESC+"1K",ansiEscapes.eraseLine=ESC+"2K",ansiEscapes.eraseDown=ESC+"J",ansiEscapes.eraseUp=ESC+"1J",ansiEscapes.eraseScreen=ESC+"2J",ansiEscapes.scrollUp=ESC+"S",ansiEscapes.scrollDown=ESC+"T",ansiEscapes.clearScreen="\x1Bc",ansiEscapes.clearTerminal=isWindows?`${ansiEscapes.eraseScreen}${ESC}0f`:`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`,ansiEscapes.enterAlternativeScreen=ESC+"?1049h",ansiEscapes.exitAlternativeScreen=ESC+"?1049l",ansiEscapes.beep=BEL,ansiEscapes.link=(e,t)=>[OSC,"8",SEP,SEP,t,BEL,e,OSC,"8",SEP,SEP,BEL].join(""),ansiEscapes.image=(e,t={})=>{let r=`${OSC}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+BEL},ansiEscapes.iTerm={setCwd:(e=cwdFunction())=>`${OSC}50;CurrentDir=${e}${BEL}`,annotation(e,t={}){let r=`${OSC}1337;`;const n=typeof t.x<"u",o=typeof t.y<"u";if((n||o)&&!(n&&o&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+BEL}};var onetime$2={exports:{}},mimicFn$2={exports:{}};const mimicFn$1=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};mimicFn$2.exports=mimicFn$1,mimicFn$2.exports.default=mimicFn$1;var mimicFnExports=mimicFn$2.exports;const mimicFn=mimicFnExports,calledFunctions=new WeakMap,onetime=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"<anonymous>",s=function(...l){if(calledFunctions.set(s,++n),n===1)r=e.apply(this,l),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return r};return mimicFn(s,e),calledFunctions.set(s,n),s};onetime$2.exports=onetime,onetime$2.exports.default=onetime,onetime$2.exports.callCount=e=>{if(!calledFunctions.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return calledFunctions.get(e)};var onetimeExports=onetime$2.exports;const onetime$1=index.getDefaultExportFromCjs(onetimeExports);var signalExit$1={exports:{}},signals$1={exports:{}},hasRequiredSignals;function requireSignals(){return hasRequiredSignals||(hasRequiredSignals=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(signals$1)),signals$1.exports}var process$1=index.commonjsGlobal.process;const processOk=function(e){return 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"};if(!processOk(process$1))signalExit$1.exports=function(){return function(){}};else{var assert=require$$0__default,signals=requireSignals(),isWin=/^win/i.test(process$1.platform),EE=EventEmitter__default;typeof EE!="function"&&(EE=EE.EventEmitter);var emitter;process$1.__signal_exit_emitter__?emitter=process$1.__signal_exit_emitter__:(emitter=process$1.__signal_exit_emitter__=new EE,emitter.count=0,emitter.emitted={}),emitter.infinite||(emitter.setMaxListeners(1/0),emitter.infinite=!0),signalExit$1.exports=function(e,t){if(!processOk(index.commonjsGlobal.process))return function(){};assert.equal(typeof e,"function","a callback must be provided for exit handler"),loaded===!1&&load();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=function(){emitter.removeListener(r,e),emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0&&unload()};return emitter.on(r,e),n};var unload=function(){!loaded||!processOk(index.commonjsGlobal.process)||(loaded=!1,signals.forEach(function(t){try{process$1.removeListener(t,sigListeners[t])}catch{}}),process$1.emit=originalProcessEmit,process$1.reallyExit=originalProcessReallyExit,emitter.count-=1)};signalExit$1.exports.unload=unload;var emit=function(t,r,n){emitter.emitted[t]||(emitter.emitted[t]=!0,emitter.emit(t,r,n))},sigListeners={};signals.forEach(function(e){sigListeners[e]=function(){if(processOk(index.commonjsGlobal.process)){var r=process$1.listeners(e);r.length===emitter.count&&(unload(),emit("exit",null,e),emit("afterexit",null,e),isWin&&e==="SIGHUP"&&(e="SIGINT"),process$1.kill(process$1.pid,e))}}}),signalExit$1.exports.signals=function(){return signals};var loaded=!1,load=function(){loaded||!processOk(index.commonjsGlobal.process)||(loaded=!0,emitter.count+=1,signals=signals.filter(function(t){try{return process$1.on(t,sigListeners[t]),!0}catch{return!1}}),process$1.emit=processEmit,process$1.reallyExit=processReallyExit)};signalExit$1.exports.load=load;var originalProcessReallyExit=process$1.reallyExit,processReallyExit=function(t){processOk(index.commonjsGlobal.process)&&(process$1.exitCode=t||0,emit("exit",process$1.exitCode,null),emit("afterexit",process$1.exitCode,null),originalProcessReallyExit.call(process$1,process$1.exitCode))},originalProcessEmit=process$1.emit,processEmit=function(t,r){if(t==="exit"&&processOk(index.commonjsGlobal.process)){r!==void 0&&(process$1.exitCode=r);var n=originalProcessEmit.apply(this,arguments);return emit("exit",process$1.exitCode,null),emit("afterexit",process$1.exitCode,null),n}else return originalProcessEmit.apply(this,arguments)}}var signalExitExports=signalExit$1.exports;const signalExit=index.getDefaultExportFromCjs(signalExitExports),restoreCursor=onetime$1(()=>{signalExit(()=>{process__default.stderr.write("\x1B[?25h")},{alwaysLast:!0})});let isHidden=!1;const cliCursor={};cliCursor.show=(e=process__default.stderr)=>{e.isTTY&&(isHidden=!1,e.write("\x1B[?25h"))},cliCursor.hide=(e=process__default.stderr)=>{e.isTTY&&(restoreCursor(),isHidden=!0,e.write("\x1B[?25l"))},cliCursor.toggle=(e,t)=>{e!==void 0&&(isHidden=e),isHidden?cliCursor.show(t):cliCursor.hide(t)};function isFullwidthCodePoint(e){return Number.isInteger(e)?index$1.eastAsianWidth(e)===2:!1}const ESCAPES=new Set([27,155]),CODE_POINT_0="0".codePointAt(0),CODE_POINT_9="9".codePointAt(0),endCodesSet=new Set,endCodesMap=new Map;for(const[e,t]of index$1.ansiStyles.codes)endCodesSet.add(index$1.ansiStyles.color.ansi(t)),endCodesMap.set(index$1.ansiStyles.color.ansi(e),index$1.ansiStyles.color.ansi(t));function getEndCode(e){if(endCodesSet.has(e))return e;if(endCodesMap.has(e))return endCodesMap.get(e);e=e.slice(2),e.includes(";")&&(e=e[0]+"0");const t=index$1.ansiStyles.codes.get(Number.parseInt(e,10));return t?index$1.ansiStyles.color.ansi(t):index$1.ansiStyles.reset.open}function findNumberIndex(e){for(let t=0;t<e.length;t++){const r=e.codePointAt(t);if(r>=CODE_POINT_0&&r<=CODE_POINT_9)return t}return-1}function parseAnsiCode(e,t){e=e.slice(t,t+19);const r=findNumberIndex(e);if(r!==-1){let n=e.indexOf("m",r);return n===-1&&(n=e.length),e.slice(0,n+1)}}function tokenize(e,t=Number.POSITIVE_INFINITY){const r=[];let n=0,o=0;for(;n<e.length;){const s=e.codePointAt(n);if(ESCAPES.has(s)){const u=parseAnsiCode(e,n);if(u){r.push({type:"ansi",code:u,endCode:getEndCode(u)}),n+=u.length;continue}}const l=isFullwidthCodePoint(s),i=String.fromCodePoint(s);if(r.push({type:"character",value:i,isFullWidth:l}),n+=i.length,o+=l?2:i.length,o>=t)break}return r}function reduceAnsiCodes(e){let t=[];for(const r of e)r.code===index$1.ansiStyles.reset.open?t=[]:endCodesSet.has(r.code)?t=t.filter(n=>n.endCode!==r.code):(t=t.filter(n=>n.endCode!==r.endCode),t.push(r));return t}function undoAnsiCodes(e){return reduceAnsiCodes(e).map(({endCode:n})=>n).reverse().join("")}function sliceAnsi(e,t,r){const n=tokenize(e,r);let o=[],s=0,l="",i=!1;for(const u of n){if(r!==void 0&&s>=r)break;u.type==="ansi"?(o.push(u),i&&(l+=u.code)):(!i&&s>=t&&(i=!0,o=reduceAnsiCodes(o),l=o.map(({code:c})=>c).join("")),i&&(l+=u.value),s+=u.isFullWidth?2:u.value.length)}return l+=undoAnsiCodes(o),l}const defaultTerminalHeight=24,getWidth=e=>{const{columns:t}=e;return t||80},fitToTerminalHeight=(e,t)=>{const r=e.rows??defaultTerminalHeight,n=t.split(`
2
+ `),o=n.length-r;return o<=0?t:sliceAnsi(t,index$1.stripAnsi(n.slice(0,o).join(`
3
+ `)).length+1)};function createLogUpdate(e,{showCursor:t=!1}={}){let r=0,n=getWidth(e),o="";const s=(...l)=>{t||cliCursor.hide();let i=l.join(" ")+`
4
+ `;i=fitToTerminalHeight(e,i);const u=getWidth(e);i===o&&n===u||(o=i,n=u,i=index$2.default(i,u,{trim:!1,hard:!0,wordWrap:!1}),e.write(ansiEscapes.eraseLines(r)+i),r=i.split(`
5
+ `).length)};return s.clear=()=>{e.write(ansiEscapes.eraseLines(r)),o="",n=getWidth(e),r=0},s.done=()=>{o="",n=getWidth(e),r=0,t||cliCursor.show()},s}createLogUpdate(process__default.stdout),createLogUpdate(process__default.stderr),exports.createLogUpdate=createLogUpdate;
@@ -0,0 +1,5 @@
1
+ import d from"node:process";import{g as j,c as m}from"./index.mjs";import Y from"assert";import J from"events";import X from"./index4.mjs";import{e as z,a as h,s as Q}from"../shared/cli.caadc2d6.mjs";import"tty";import"util";import"os";import"node:util";import"string_decoder";import"stream";import"crypto";import"node:path";import"execa";import"path";import"node:os";import"node:stream";import"node:fs/promises";import"child_process";import"node:url";import"node:module";import"node:fs";const i="\x1B[",C="\x1B]",v="\x07",I=";",P=typeof window<"u"&&typeof window.document<"u",U=!P&&d.env.TERM_PROGRAM==="Apple_Terminal",Z=!P&&d.platform==="win32",ee=P?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:d.cwd,o={};o.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?i+(e+1)+"G":i+(t+1)+I+(e+1)+"H"},o.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=i+-e+"D":e>0&&(r+=i+e+"C"),t<0?r+=i+-t+"A":t>0&&(r+=i+t+"B"),r},o.cursorUp=(e=1)=>i+e+"A",o.cursorDown=(e=1)=>i+e+"B",o.cursorForward=(e=1)=>i+e+"C",o.cursorBackward=(e=1)=>i+e+"D",o.cursorLeft=i+"G",o.cursorSavePosition=U?"\x1B7":i+"s",o.cursorRestorePosition=U?"\x1B8":i+"u",o.cursorGetPosition=i+"6n",o.cursorNextLine=i+"E",o.cursorPrevLine=i+"F",o.cursorHide=i+"?25l",o.cursorShow=i+"?25h",o.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=o.eraseLine+(r<e-1?o.cursorUp():"");return e&&(t+=o.cursorLeft),t},o.eraseEndLine=i+"K",o.eraseStartLine=i+"1K",o.eraseLine=i+"2K",o.eraseDown=i+"J",o.eraseUp=i+"1J",o.eraseScreen=i+"2J",o.scrollUp=i+"S",o.scrollDown=i+"T",o.clearScreen="\x1Bc",o.clearTerminal=Z?`${o.eraseScreen}${i}0f`:`${o.eraseScreen}${i}3J${i}H`,o.enterAlternativeScreen=i+"?1049h",o.exitAlternativeScreen=i+"?1049l",o.beep=v,o.link=(e,t)=>[C,"8",I,I,t,v,e,C,"8",I,I,v].join(""),o.image=(e,t={})=>{let r=`${C}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+v},o.iTerm={setCwd:(e=ee())=>`${C}50;CurrentDir=${e}${v}`,annotation(e,t={}){let r=`${C}1337;`;const n=typeof t.x<"u",u=typeof t.y<"u";if((n||u)&&!(n&&u&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+v}};var A={exports:{}},b={exports:{}};const D=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};b.exports=D,b.exports.default=D;var te=b.exports;const re=te,g=new WeakMap,H=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0;const u=e.displayName||e.name||"<anonymous>",f=function(...p){if(g.set(f,++n),n===1)r=e.apply(this,p),e=null;else if(t.throw===!0)throw new Error(`Function \`${u}\` can only be called once`);return r};return re(f,e),g.set(f,n),f};A.exports=H,A.exports.default=H,A.exports.callCount=e=>{if(!g.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return g.get(e)};var ne=A.exports;const oe=j(ne);var S={exports:{}},_={exports:{}},M;function ie(){return M||(M=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(_)),_.exports}var s=m.process;const x=function(e){return 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"};if(!x(s))S.exports=function(){return function(){}};else{var se=Y,T=ie(),ue=/^win/i.test(s.platform),G=J;typeof G!="function"&&(G=G.EventEmitter);var c;s.__signal_exit_emitter__?c=s.__signal_exit_emitter__:(c=s.__signal_exit_emitter__=new G,c.count=0,c.emitted={}),c.infinite||(c.setMaxListeners(1/0),c.infinite=!0),S.exports=function(e,t){if(!x(m.process))return function(){};se.equal(typeof e,"function","a callback must be provided for exit handler"),E===!1&&V();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=function(){c.removeListener(r,e),c.listeners("exit").length===0&&c.listeners("afterexit").length===0&&F()};return c.on(r,e),n};var F=function(){!E||!x(m.process)||(E=!1,T.forEach(function(t){try{s.removeListener(t,O[t])}catch{}}),s.emit=R,s.reallyExit=W,c.count-=1)};S.exports.unload=F;var y=function(t,r,n){c.emitted[t]||(c.emitted[t]=!0,c.emit(t,r,n))},O={};T.forEach(function(e){O[e]=function(){if(x(m.process)){var r=s.listeners(e);r.length===c.count&&(F(),y("exit",null,e),y("afterexit",null,e),ue&&e==="SIGHUP"&&(e="SIGINT"),s.kill(s.pid,e))}}}),S.exports.signals=function(){return T};var E=!1,V=function(){E||!x(m.process)||(E=!0,c.count+=1,T=T.filter(function(t){try{return s.on(t,O[t]),!0}catch{return!1}}),s.emit=ce,s.reallyExit=le)};S.exports.load=V;var W=s.reallyExit,le=function(t){x(m.process)&&(s.exitCode=t||0,y("exit",s.exitCode,null),y("afterexit",s.exitCode,null),W.call(s,s.exitCode))},R=s.emit,ce=function(t,r){if(t==="exit"&&x(m.process)){r!==void 0&&(s.exitCode=r);var n=R.apply(this,arguments);return y("exit",s.exitCode,null),y("afterexit",s.exitCode,null),n}else return R.apply(this,arguments)}}var fe=S.exports;const ae=j(fe),pe=oe(()=>{ae(()=>{d.stderr.write("\x1B[?25h")},{alwaysLast:!0})});let $=!1;const w={};w.show=(e=d.stderr)=>{e.isTTY&&($=!1,e.write("\x1B[?25h"))},w.hide=(e=d.stderr)=>{e.isTTY&&(pe(),$=!0,e.write("\x1B[?25l"))},w.toggle=(e,t)=>{e!==void 0&&($=e),$?w.show(t):w.hide(t)};function de(e){return Number.isInteger(e)?z(e)===2:!1}const he=new Set([27,155]),me="0".codePointAt(0),xe="9".codePointAt(0),N=new Set,k=new Map;for(const[e,t]of h.codes)N.add(h.color.ansi(t)),k.set(h.color.ansi(e),h.color.ansi(t));function we(e){if(N.has(e))return e;if(k.has(e))return k.get(e);e=e.slice(2),e.includes(";")&&(e=e[0]+"0");const t=h.codes.get(Number.parseInt(e,10));return t?h.color.ansi(t):h.reset.open}function ve(e){for(let t=0;t<e.length;t++){const r=e.codePointAt(t);if(r>=me&&r<=xe)return t}return-1}function Se(e,t){e=e.slice(t,t+19);const r=ve(e);if(r!==-1){let n=e.indexOf("m",r);return n===-1&&(n=e.length),e.slice(0,n+1)}}function ye(e,t=Number.POSITIVE_INFINITY){const r=[];let n=0,u=0;for(;n<e.length;){const f=e.codePointAt(n);if(he.has(f)){const a=Se(e,n);if(a){r.push({type:"ansi",code:a,endCode:we(a)}),n+=a.length;continue}}const p=de(f),l=String.fromCodePoint(f);if(r.push({type:"character",value:l,isFullWidth:p}),n+=l.length,u+=p?2:l.length,u>=t)break}return r}function q(e){let t=[];for(const r of e)r.code===h.reset.open?t=[]:N.has(r.code)?t=t.filter(n=>n.endCode!==r.code):(t=t.filter(n=>n.endCode!==r.endCode),t.push(r));return t}function Ce(e){return q(e).map(({endCode:n})=>n).reverse().join("")}function Ie(e,t,r){const n=ye(e,r);let u=[],f=0,p="",l=!1;for(const a of n){if(r!==void 0&&f>=r)break;a.type==="ansi"?(u.push(a),l&&(p+=a.code)):(!l&&f>=t&&(l=!0,u=q(u),p=u.map(({code:K})=>K).join("")),l&&(p+=a.value),f+=a.isFullWidth?2:a.value.length)}return p+=Ce(u),p}const Te=24,L=e=>{const{columns:t}=e;return t||80},Ee=(e,t)=>{const r=e.rows??Te,n=t.split(`
2
+ `),u=n.length-r;return u<=0?t:Ie(t,Q(n.slice(0,u).join(`
3
+ `)).length+1)};function B(e,{showCursor:t=!1}={}){let r=0,n=L(e),u="";const f=(...p)=>{t||w.hide();let l=p.join(" ")+`
4
+ `;l=Ee(e,l);const a=L(e);l===u&&n===a||(u=l,n=a,l=X(l,a,{trim:!1,hard:!0,wordWrap:!1}),e.write(o.eraseLines(r)+l),r=l.split(`
5
+ `).length)};return f.clear=()=>{e.write(o.eraseLines(r)),u="",n=L(e),r=0},f.done=()=>{u="",n=L(e),r=0,t||w.show()},f}B(d.stdout),B(d.stderr);export{B as createLogUpdate};
@@ -0,0 +1 @@
1
+ "use strict";const index=require("../shared/cli.6ba50424.cjs");function isFullwidthCodePoint(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const astralRegex=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,ESCAPES=["\x1B","\x9B"],wrapAnsi=e=>`${ESCAPES[0]}[${e}m`,checkAnsi=(e,t,a)=>{let s=[];e=[...e];for(let i of e){const f=i;i.includes(";")&&(i=i.split(";")[0][0]+"0");const r=index.ansiStyles.codes.get(Number.parseInt(i,10));if(r){const n=e.indexOf(r.toString());n===-1?s.push(wrapAnsi(t?r:f)):e.splice(n,1)}else if(t){s.push(wrapAnsi(0));break}else s.push(wrapAnsi(f))}if(t&&(s=s.filter((i,f)=>s.indexOf(i)===f),a!==void 0)){const i=wrapAnsi(index.ansiStyles.codes.get(Number.parseInt(a,10)));s=s.reduce((f,r)=>r===i?[r,...f]:[...f,r],[])}return s.join("")};function sliceAnsi(e,t,a){const s=[...e],i=[];let f=typeof a=="number"?a:s.length,r=!1,n,u=0,l="";for(const[F,p]of s.entries()){let h=!1;if(ESCAPES.includes(p)){const c=/\d[^m]*/.exec(e.slice(F,F+18));n=c&&c.length>0?c[0]:void 0,u<f&&(r=!0,n!==void 0&&i.push(n))}else r&&p==="m"&&(r=!1,h=!0);if(!r&&!h&&u++,!astralRegex.test(p)&&isFullwidthCodePoint(p.codePointAt())&&(u++,typeof a!="number"&&f++),u>t&&u<=f)l+=p;else if(u===t&&!r&&n!==void 0)l=checkAnsi(i);else if(u>=f){l+=checkAnsi(i,!0,n);break}}return l}function getIndexOfNearestSpace(e,t,a){if(e.charAt(t)===" ")return t;const s=a?1:-1;for(let i=0;i<=3;i++){const f=t+i*s;if(e.charAt(f)===" ")return f}return t}function cliTruncate(e,t,a={}){const{position:s="end",space:i=!1,preferTruncationOnSpace:f=!1}=a;let{truncationCharacter:r="\u2026"}=a;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return r;const n=index.stringWidth(e);if(n<=t)return e;if(s==="start"){if(f){const u=getIndexOfNearestSpace(e,n-t+1,!0);return r+sliceAnsi(e,u,n).trim()}return i===!0&&(r+=" "),r+sliceAnsi(e,n-t+index.stringWidth(r),n)}if(s==="middle"){i===!0&&(r=` ${r} `);const u=Math.floor(t/2);if(f){const l=getIndexOfNearestSpace(e,u),F=getIndexOfNearestSpace(e,n-(t-u)+1,!0);return sliceAnsi(e,0,l)+r+sliceAnsi(e,F,n).trim()}return sliceAnsi(e,0,u)+r+sliceAnsi(e,n-(t-u)+index.stringWidth(r),n)}if(s==="end"){if(f){const u=getIndexOfNearestSpace(e,t-1);return sliceAnsi(e,0,u)+r}return i===!0&&(r=` ${r}`),sliceAnsi(e,0,t-index.stringWidth(r))+r}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}exports.default=cliTruncate;
@@ -0,0 +1 @@
1
+ import{a as A,b as c}from"../shared/cli.caadc2d6.mjs";function S(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const $=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,y=["\x1B","\x9B"],h=e=>`${y[0]}[${e}m`,B=(e,t,a)=>{let s=[];e=[...e];for(let f of e){const i=f;f.includes(";")&&(f=f.split(";")[0][0]+"0");const r=A.codes.get(Number.parseInt(f,10));if(r){const n=e.indexOf(r.toString());n===-1?s.push(h(t?r:i)):e.splice(n,1)}else if(t){s.push(h(0));break}else s.push(h(i))}if(t&&(s=s.filter((f,i)=>s.indexOf(f)===i),a!==void 0)){const f=h(A.codes.get(Number.parseInt(a,10)));s=s.reduce((i,r)=>r===f?[r,...i]:[...i,r],[])}return s.join("")};function p(e,t,a){const s=[...e],f=[];let i=typeof a=="number"?a:s.length,r=!1,n,u=0,l="";for(const[x,F]of s.entries()){let b=!1;if(y.includes(F)){const g=/\d[^m]*/.exec(e.slice(x,x+18));n=g&&g.length>0?g[0]:void 0,u<i&&(r=!0,n!==void 0&&f.push(n))}else r&&F==="m"&&(r=!1,b=!0);if(!r&&!b&&u++,!$.test(F)&&S(F.codePointAt())&&(u++,typeof a!="number"&&i++),u>t&&u<=i)l+=F;else if(u===t&&!r&&n!==void 0)l=B(f);else if(u>=i){l+=B(f,!0,n);break}}return l}function E(e,t,a){if(e.charAt(t)===" ")return t;const s=a?1:-1;for(let f=0;f<=3;f++){const i=t+f*s;if(e.charAt(i)===" ")return i}return t}function m(e,t,a={}){const{position:s="end",space:f=!1,preferTruncationOnSpace:i=!1}=a;let{truncationCharacter:r="\u2026"}=a;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return r;const n=c(e);if(n<=t)return e;if(s==="start"){if(i){const u=E(e,n-t+1,!0);return r+p(e,u,n).trim()}return f===!0&&(r+=" "),r+p(e,n-t+c(r),n)}if(s==="middle"){f===!0&&(r=` ${r} `);const u=Math.floor(t/2);if(i){const l=E(e,u),x=E(e,n-(t-u)+1,!0);return p(e,0,l)+r+p(e,x,n).trim()}return p(e,0,u)+r+p(e,n-(t-u)+c(r),n)}if(s==="end"){if(i){const u=E(e,t-1);return p(e,0,u)+r}return f===!0&&(r=` ${r}`),p(e,0,t-c(r))+r}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}export{m as default};
@@ -0,0 +1,8 @@
1
+ "use strict";const index=require("../shared/cli.6ba50424.cjs"),ESCAPES=new Set(["\x1B","\x9B"]),END_CODE=39,ANSI_ESCAPE_BELL="\x07",ANSI_CSI="[",ANSI_OSC="]",ANSI_SGR_TERMINATOR="m",ANSI_ESCAPE_LINK=`${ANSI_OSC}8;;`,wrapAnsiCode=e=>`${ESCAPES.values().next().value}${ANSI_CSI}${e}${ANSI_SGR_TERMINATOR}`,wrapAnsiHyperlink=e=>`${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${e}${ANSI_ESCAPE_BELL}`,wordLengths=e=>e.split(" ").map(t=>index.stringWidth(t)),wrapWord=(e,t,i)=>{const a=[...t];let f=!1,h=!1,s=index.stringWidth(index.stripAnsi(e.at(-1)));for(const[n,c]of a.entries()){const g=index.stringWidth(c);if(s+g<=i?e[e.length-1]+=c:(e.push(c),s=0),ESCAPES.has(c)&&(f=!0,h=a.slice(n+1,n+1+ANSI_ESCAPE_LINK.length).join("")===ANSI_ESCAPE_LINK),f){h?c===ANSI_ESCAPE_BELL&&(f=!1,h=!1):c===ANSI_SGR_TERMINATOR&&(f=!1);continue}s+=g,s===i&&n<a.length-1&&(e.push(""),s=0)}!s&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},stringVisibleTrimSpacesRight=e=>{const t=e.split(" ");let i=t.length;for(;i>0&&!(index.stringWidth(t[i-1])>0);)i--;return i===t.length?e:t.slice(0,i).join(" ")+t.slice(i).join("")},exec=(e,t,i={})=>{if(i.trim!==!1&&e.trim()==="")return"";let a="",f,h;const s=wordLengths(e);let n=[""];for(const[l,d]of e.split(" ").entries()){i.trim!==!1&&(n[n.length-1]=n.at(-1).trimStart());let r=index.stringWidth(n.at(-1));if(l!==0&&(r>=t&&(i.wordWrap===!1||i.trim===!1)&&(n.push(""),r=0),(r>0||i.trim===!1)&&(n[n.length-1]+=" ",r++)),i.hard&&s[l]>t){const o=t-r,p=1+Math.floor((s[l]-o-1)/t);Math.floor((s[l]-1)/t)<p&&n.push(""),wrapWord(n,d,t);continue}if(r+s[l]>t&&r>0&&s[l]>0){if(i.wordWrap===!1&&r<t){wrapWord(n,d,t);continue}n.push("")}if(r+s[l]>t&&i.wordWrap===!1){wrapWord(n,d,t);continue}n[n.length-1]+=d}i.trim!==!1&&(n=n.map(l=>stringVisibleTrimSpacesRight(l)));const c=n.join(`
2
+ `),g=[...c];let u=0;for(const[l,d]of g.entries()){if(a+=d,ESCAPES.has(d)){const{groups:o}=new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(c.slice(u))||{groups:{}};if(o.code!==void 0){const p=Number.parseFloat(o.code);f=p===END_CODE?void 0:p}else o.uri!==void 0&&(h=o.uri.length===0?void 0:o.uri)}const r=index.ansiStyles.codes.get(Number(f));g[l+1]===`
3
+ `?(h&&(a+=wrapAnsiHyperlink("")),f&&r&&(a+=wrapAnsiCode(r))):d===`
4
+ `&&(f&&r&&(a+=wrapAnsiCode(f)),h&&(a+=wrapAnsiHyperlink(h))),u+=d.length}return a};function wrapAnsi(e,t,i){return String(e).normalize().replaceAll(`\r
5
+ `,`
6
+ `).split(`
7
+ `).map(a=>exec(a,t,i)).join(`
8
+ `)}exports.default=wrapAnsi;
@@ -0,0 +1,8 @@
1
+ import{b as g,a as b,s as m}from"../shared/cli.caadc2d6.mjs";const S=new Set(["\x1B","\x9B"]),_=39,x="\x07",N="[",k="]",$="m",E=`${k}8;;`,C=e=>`${S.values().next().value}${N}${e}${$}`,I=e=>`${S.values().next().value}${E}${e}${x}`,w=e=>e.split(" ").map(t=>g(t)),L=(e,t,n)=>{const r=[...t];let f=!1,d=!1,a=g(m(e.at(-1)));for(const[i,c]of r.entries()){const p=g(c);if(a+p<=n?e[e.length-1]+=c:(e.push(c),a=0),S.has(c)&&(f=!0,d=r.slice(i+1,i+1+E.length).join("")===E),f){d?c===x&&(f=!1,d=!1):c===$&&(f=!1);continue}a+=p,a===n&&i<r.length-1&&(e.push(""),a=0)}!a&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},j=e=>{const t=e.split(" ");let n=t.length;for(;n>0&&!(g(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")},v=(e,t,n={})=>{if(n.trim!==!1&&e.trim()==="")return"";let r="",f,d;const a=w(e);let i=[""];for(const[l,o]of e.split(" ").entries()){n.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let s=g(i.at(-1));if(l!==0&&(s>=t&&(n.wordWrap===!1||n.trim===!1)&&(i.push(""),s=0),(s>0||n.trim===!1)&&(i[i.length-1]+=" ",s++)),n.hard&&a[l]>t){const h=t-s,u=1+Math.floor((a[l]-h-1)/t);Math.floor((a[l]-1)/t)<u&&i.push(""),L(i,o,t);continue}if(s+a[l]>t&&s>0&&a[l]>0){if(n.wordWrap===!1&&s<t){L(i,o,t);continue}i.push("")}if(s+a[l]>t&&n.wordWrap===!1){L(i,o,t);continue}i[i.length-1]+=o}n.trim!==!1&&(i=i.map(l=>j(l)));const c=i.join(`
2
+ `),p=[...c];let A=0;for(const[l,o]of p.entries()){if(r+=o,S.has(o)){const{groups:h}=new RegExp(`(?:\\${N}(?<code>\\d+)m|\\${E}(?<uri>.*)${x})`).exec(c.slice(A))||{groups:{}};if(h.code!==void 0){const u=Number.parseFloat(h.code);f=u===_?void 0:u}else h.uri!==void 0&&(d=h.uri.length===0?void 0:h.uri)}const s=b.codes.get(Number(f));p[l+1]===`
3
+ `?(d&&(r+=I("")),f&&s&&(r+=C(s))):o===`
4
+ `&&(f&&s&&(r+=C(f)),d&&(r+=I(d))),A+=o.length}return r};function R(e,t,n){return String(e).normalize().replaceAll(`\r
5
+ `,`
6
+ `).split(`
7
+ `).map(r=>v(r,t,n)).join(`
8
+ `)}export{R as default};
@@ -0,0 +1 @@
1
+ "use strict";const require$$0=require("path"),require$$1=require("fs"),require$$0$1=require("os");function _interopDefaultCompat(c){return c&&typeof c=="object"&&"default"in c?c.default:c}function _mergeNamespaces(c,u){for(var $=0;$<u.length;$++){const S=u[$];if(typeof S!="string"&&!Array.isArray(S))for(const P in S)P!=="default"&&!(P in c)&&(c[P]=S[P])}return c}const require$$0__default=_interopDefaultCompat(require$$0),require$$1__default=_interopDefaultCompat(require$$1),require$$0__default$1=_interopDefaultCompat(require$$0$1);function commonjsRequire(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var dist={};(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.lilconfigSync=c.lilconfig=c.defaultLoaders=void 0;const u=require$$0__default,$=require$$1__default,S=require$$0__default$1,P=$.promises.readFile;function N(n){return["package.json",`.${n}rc.json`,`.${n}rc.js`,`.${n}rc.cjs`,`.config/${n}rc`,`.config/${n}rc.json`,`.config/${n}rc.js`,`.config/${n}rc.cjs`,`${n}.config.js`,`${n}.config.cjs`]}function v(n){return u.dirname(n)||u.sep}c.defaultLoaders=Object.freeze({".js":commonjsRequire,".json":commonjsRequire,".cjs":commonjsRequire,noExt(n,i){return JSON.parse(i)}});function A(n){return n==="noExt"?"files without extensions":`extension "${n}"`}function F(n,i={}){const f={stopDir:S.homedir(),searchPlaces:N(n),ignoreEmptySearchPlaces:!0,cache:!0,transform:a=>a,packageProp:[n],...i,loaders:{...c.defaultLoaders,...i.loaders}};return f.searchPlaces.forEach(a=>{const E=u.extname(a)||"noExt",j=f.loaders[E];if(!j)throw new Error(`No loader specified for ${A(E)}, so searchPlaces item "${a}" is invalid`);if(typeof j!="function")throw new Error(`loader for ${A(E)} is not a function (type provided: "${typeof j}"), so searchPlaces item "${a}" is invalid`)}),f}function x(n,i){return typeof n=="string"&&n in i?i[n]:(Array.isArray(n)?n:n.split(".")).reduce((f,a)=>f===void 0?f:f[a],i)||null}function M(n){if(!n)throw new Error("load must pass a non-empty string")}function D(n,i){if(!n)throw new Error(`No loader specified for extension "${i}"`);if(typeof n!="function")throw new Error("loader is not a function")}const K=n=>(i,f,a)=>(n&&i.set(f,a),a);function O(n,i){const{ignoreEmptySearchPlaces:f,loaders:a,packageProp:E,searchPlaces:j,stopDir:L,transform:g,cache:l}=F(n,i),h=new Map,d=new Map,_=K(l);return{async search(k=process.cwd()){const e={config:null,filepath:""},y=new Set;let r=k;e:for(;;){if(l){const t=h.get(r);if(t!==void 0){for(const o of y)h.set(o,t);return t}y.add(r)}for(const t of j){const o=u.join(r,t);try{await $.promises.access(o)}catch{continue}const p=String(await P(o)),s=u.extname(t)||"noExt",w=a[s];if(t==="package.json"){const C=await w(o,p),b=x(E,C);if(b!=null){e.config=b,e.filepath=o;break e}continue}const q=p.trim()==="";if(!(q&&f)){q?(e.isEmpty=!0,e.config=void 0):(D(w,s),e.config=await w(o,p)),e.filepath=o;break e}}if(r===L||r===v(r))break e;r=v(r)}const m=e.filepath===""&&e.config===null?g(null):g(e);if(l)for(const t of y)h.set(t,m);return m},async load(k){M(k);const e=u.resolve(process.cwd(),k);if(l&&d.has(e))return d.get(e);const{base:y,ext:r}=u.parse(e),m=r||"noExt",t=a[m];D(t,m);const o=String(await P(e));if(y==="package.json"){const w=await t(e,o);return _(d,e,g({config:x(E,w),filepath:e}))}const p={config:null,filepath:e},s=o.trim()==="";return s&&f?_(d,e,g({config:void 0,filepath:e,isEmpty:!0})):(p.config=s?void 0:await t(e,o),_(d,e,g(s?{...p,isEmpty:s,config:void 0}:p)))},clearLoadCache(){l&&d.clear()},clearSearchCache(){l&&h.clear()},clearCaches(){l&&(d.clear(),h.clear())}}}c.lilconfig=O;function R(n,i){const{ignoreEmptySearchPlaces:f,loaders:a,packageProp:E,searchPlaces:j,stopDir:L,transform:g,cache:l}=F(n,i),h=new Map,d=new Map,_=K(l);return{search(k=process.cwd()){const e={config:null,filepath:""},y=new Set;let r=k;e:for(;;){if(l){const t=h.get(r);if(t!==void 0){for(const o of y)h.set(o,t);return t}y.add(r)}for(const t of j){const o=u.join(r,t);try{$.accessSync(o)}catch{continue}const p=u.extname(t)||"noExt",s=a[p],w=String($.readFileSync(o));if(t==="package.json"){const C=s(o,w),b=x(E,C);if(b!=null){e.config=b,e.filepath=o;break e}continue}const q=w.trim()==="";if(!(q&&f)){q?(e.isEmpty=!0,e.config=void 0):(D(s,p),e.config=s(o,w)),e.filepath=o;break e}}if(r===L||r===v(r))break e;r=v(r)}const m=e.filepath===""&&e.config===null?g(null):g(e);if(l)for(const t of y)h.set(t,m);return m},load(k){M(k);const e=u.resolve(process.cwd(),k);if(l&&d.has(e))return d.get(e);const{base:y,ext:r}=u.parse(e),m=r||"noExt",t=a[m];D(t,m);const o=String($.readFileSync(e));if(y==="package.json"){const w=t(e,o);return g({config:x(E,w),filepath:e})}const p={config:null,filepath:e},s=o.trim()==="";return s&&f?_(d,e,g({filepath:e,config:void 0,isEmpty:!0})):(p.config=s?void 0:t(e,o),_(d,e,g(s?{...p,isEmpty:s,config:void 0}:p)))},clearLoadCache(){l&&d.clear()},clearSearchCache(){l&&h.clear()},clearCaches(){l&&(d.clear(),h.clear())}}}c.lilconfigSync=R})(dist);const index=_mergeNamespaces({__proto__:null},[dist]);exports.index=index;
@@ -0,0 +1 @@
1
+ import T from"path";import B from"fs";import G from"os";function H(l,u){for(var E=0;E<u.length;E++){const S=u[E];if(typeof S!="string"&&!Array.isArray(S))for(const P in S)P!=="default"&&!(P in l)&&(l[P]=S[P])}return l}function A(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var O={};(function(l){Object.defineProperty(l,"__esModule",{value:!0}),l.lilconfigSync=l.lilconfig=l.defaultLoaders=void 0;const u=T,E=B,S=G,P=E.promises.readFile;function R(n){return["package.json",`.${n}rc.json`,`.${n}rc.js`,`.${n}rc.cjs`,`.config/${n}rc`,`.config/${n}rc.json`,`.config/${n}rc.js`,`.config/${n}rc.cjs`,`${n}.config.js`,`${n}.config.cjs`]}function _(n){return u.dirname(n)||u.sep}l.defaultLoaders=Object.freeze({".js":A,".json":A,".cjs":A,noExt(n,c){return JSON.parse(c)}});function F(n){return n==="noExt"?"files without extensions":`extension "${n}"`}function M(n,c={}){const s={stopDir:S.homedir(),searchPlaces:R(n),ignoreEmptySearchPlaces:!0,cache:!0,transform:i=>i,packageProp:[n],...c,loaders:{...l.defaultLoaders,...c.loaders}};return s.searchPlaces.forEach(i=>{const k=u.extname(i)||"noExt",j=s.loaders[k];if(!j)throw new Error(`No loader specified for ${F(k)}, so searchPlaces item "${i}" is invalid`);if(typeof j!="function")throw new Error(`loader for ${F(k)} is not a function (type provided: "${typeof j}"), so searchPlaces item "${i}" is invalid`)}),s}function q(n,c){return typeof n=="string"&&n in c?c[n]:(Array.isArray(n)?n:n.split(".")).reduce((s,i)=>s===void 0?s:s[i],c)||null}function K(n){if(!n)throw new Error("load must pass a non-empty string")}function D(n,c){if(!n)throw new Error(`No loader specified for extension "${c}"`);if(typeof n!="function")throw new Error("loader is not a function")}const N=n=>(c,s,i)=>(n&&c.set(s,i),i);function z(n,c){const{ignoreEmptySearchPlaces:s,loaders:i,packageProp:k,searchPlaces:j,stopDir:L,transform:g,cache:f}=M(n,c),h=new Map,d=new Map,v=N(f);return{async search($=process.cwd()){const e={config:null,filepath:""},y=new Set;let r=$;e:for(;;){if(f){const t=h.get(r);if(t!==void 0){for(const o of y)h.set(o,t);return t}y.add(r)}for(const t of j){const o=u.join(r,t);try{await E.promises.access(o)}catch{continue}const p=String(await P(o)),a=u.extname(t)||"noExt",w=i[a];if(t==="package.json"){const b=await w(o,p),x=q(k,b);if(x!=null){e.config=x,e.filepath=o;break e}continue}const C=p.trim()==="";if(!(C&&s)){C?(e.isEmpty=!0,e.config=void 0):(D(w,a),e.config=await w(o,p)),e.filepath=o;break e}}if(r===L||r===_(r))break e;r=_(r)}const m=e.filepath===""&&e.config===null?g(null):g(e);if(f)for(const t of y)h.set(t,m);return m},async load($){K($);const e=u.resolve(process.cwd(),$);if(f&&d.has(e))return d.get(e);const{base:y,ext:r}=u.parse(e),m=r||"noExt",t=i[m];D(t,m);const o=String(await P(e));if(y==="package.json"){const w=await t(e,o);return v(d,e,g({config:q(k,w),filepath:e}))}const p={config:null,filepath:e},a=o.trim()==="";return a&&s?v(d,e,g({config:void 0,filepath:e,isEmpty:!0})):(p.config=a?void 0:await t(e,o),v(d,e,g(a?{...p,isEmpty:a,config:void 0}:p)))},clearLoadCache(){f&&d.clear()},clearSearchCache(){f&&h.clear()},clearCaches(){f&&(d.clear(),h.clear())}}}l.lilconfig=z;function J(n,c){const{ignoreEmptySearchPlaces:s,loaders:i,packageProp:k,searchPlaces:j,stopDir:L,transform:g,cache:f}=M(n,c),h=new Map,d=new Map,v=N(f);return{search($=process.cwd()){const e={config:null,filepath:""},y=new Set;let r=$;e:for(;;){if(f){const t=h.get(r);if(t!==void 0){for(const o of y)h.set(o,t);return t}y.add(r)}for(const t of j){const o=u.join(r,t);try{E.accessSync(o)}catch{continue}const p=u.extname(t)||"noExt",a=i[p],w=String(E.readFileSync(o));if(t==="package.json"){const b=a(o,w),x=q(k,b);if(x!=null){e.config=x,e.filepath=o;break e}continue}const C=w.trim()==="";if(!(C&&s)){C?(e.isEmpty=!0,e.config=void 0):(D(a,p),e.config=a(o,w)),e.filepath=o;break e}}if(r===L||r===_(r))break e;r=_(r)}const m=e.filepath===""&&e.config===null?g(null):g(e);if(f)for(const t of y)h.set(t,m);return m},load($){K($);const e=u.resolve(process.cwd(),$);if(f&&d.has(e))return d.get(e);const{base:y,ext:r}=u.parse(e),m=r||"noExt",t=i[m];D(t,m);const o=String(E.readFileSync(e));if(y==="package.json"){const w=t(e,o);return g({config:q(k,w),filepath:e})}const p={config:null,filepath:e},a=o.trim()==="";return a&&s?v(d,e,g({filepath:e,config:void 0,isEmpty:!0})):(p.config=a?void 0:t(e,o),v(d,e,g(a?{...p,isEmpty:a,config:void 0}:p)))},clearLoadCache(){f&&d.clear()},clearSearchCache(){f&&h.clear()},clearCaches(){f&&(d.clear(),h.clear())}}}l.lilconfigSync=J})(O);const I=H({__proto__:null},[O]);export{I as i};
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const i$1=require("node:process"),p=require("cac"),s=require("node:path"),node_fs=require("node:fs"),l$1=require("enquirer"),kolorist=require("kolorist"),cryptoJs=require("crypto-js"),rimraf=require("rimraf"),changelog=require("@soybeanjs/changelog"),e=require("bumpp"),promises=require("node:fs/promises"),c12=require("c12");function _interopDefaultCompat(t){return t&&typeof t=="object"&&"default"in t?t.default:t}const i__default=_interopDefaultCompat(i$1),p__default=_interopDefaultCompat(p),s__default=_interopDefaultCompat(s),l__default=_interopDefaultCompat(l$1),e__default=_interopDefaultCompat(e),version="0.8.0";var c=Object.defineProperty,a$1=(t,o,r)=>o in t?c(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,n=(t,o,r)=>(a$1(t,typeof o!="symbol"?o+"":o,r),r);async function execCommand(t,o,r){const{execa:u}=await import("execa");return(await u(t,o,r))?.stdout?.trim()||""}class Crypto{constructor(o){n(this,"secret"),this.secret=o}enCrypto(o){const r=JSON.stringify(o);return cryptoJs.AES.encrypt(r,this.secret).toString()}deCrypto(o){const r=cryptoJs.AES.decrypt(o,this.secret).toString(cryptoJs.enc.Utf8);if(r)try{return JSON.parse(r)}catch{return null}return null}}async function gitCommit(t,o){const r=t.map(([f,y])=>{const w=`${`${f}:`.padEnd(12)}${y}`;return{name:f,message:w}}),u=o.map(([f,y])=>({name:f,message:`${f.padEnd(30)} (${y})`})),g=await l__default.prompt([{name:"types",type:"select",message:"Please select a type",choices:r},{name:"scopes",type:"select",message:"Please select a scope",choices:u},{name:"description",type:"text",message:"Please enter a description"}]),h=`${g.types}(${g.scopes}): ${g.description}`;await execCommand("git",["commit","-m",h],{stdio:"inherit"})}async function gitCommitVerify(){const t=await execCommand("git",["rev-parse","--show-toplevel"]),o=s__default.join(t,".git","COMMIT_EDITMSG"),r=node_fs.readFileSync(o,"utf8").trim();if(!/(?<type>[a-z]+)(\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i.test(r))throw new Error(`${kolorist.bgRed(" ERROR ")} ${kolorist.red("git commit message must match the Conventional Commits standard!")}
2
+ "use strict";const process=require("node:process"),p=require("cac"),path=require("node:path"),node_fs=require("node:fs"),l$1=require("enquirer"),kolorist=require("kolorist"),cryptoJs=require("crypto-js"),rimraf=require("rimraf"),changelog=require("@soybeanjs/changelog"),e$1=require("bumpp"),fs=require("node:fs/promises"),c12=require("c12");function _interopDefaultCompat(t){return t&&typeof t=="object"&&"default"in t?t.default:t}const process__default=_interopDefaultCompat(process),p__default=_interopDefaultCompat(p),path__default=_interopDefaultCompat(path),l__default=_interopDefaultCompat(l$1),e__default=_interopDefaultCompat(e$1),version="0.8.1";var c=Object.defineProperty,a$1=(t,o,i)=>o in t?c(t,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[o]=i,n=(t,o,i)=>(a$1(t,typeof o!="symbol"?o+"":o,i),i);async function execCommand(t,o,i){const{execa:s}=await import("execa");return(await s(t,o,i))?.stdout?.trim()||""}class Crypto{constructor(o){n(this,"secret"),this.secret=o}enCrypto(o){const i=JSON.stringify(o);return cryptoJs.AES.encrypt(i,this.secret).toString()}deCrypto(o){const i=cryptoJs.AES.decrypt(o,this.secret).toString(cryptoJs.enc.Utf8);if(i)try{return JSON.parse(i)}catch{return null}return null}}async function gitCommit(t,o){const i=t.map(([u,h])=>{const f=`${`${u}:`.padEnd(12)}${h}`;return{name:u,message:f}}),s=o.map(([u,h])=>({name:u,message:`${u.padEnd(30)} (${h})`})),r=await l__default.prompt([{name:"types",type:"select",message:"Please select a type",choices:i},{name:"scopes",type:"select",message:"Please select a scope",choices:s},{name:"description",type:"text",message:"Please enter a description"}]),g=`${r.types}(${r.scopes}): ${r.description}`;await execCommand("git",["commit","-m",g],{stdio:"inherit"})}async function gitCommitVerify(){const t=await execCommand("git",["rev-parse","--show-toplevel"]),o=path__default.join(t,".git","COMMIT_EDITMSG"),i=node_fs.readFileSync(o,"utf8").trim();if(!/(?<type>[a-z]+)(?:\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i.test(i))throw new Error(`${kolorist.bgRed(" ERROR ")} ${kolorist.red("git commit message must match the Conventional Commits standard!")}
3
3
 
4
- ${kolorist.green("Recommended to use the command `pnpm commit` to generate Conventional Commits compliant commit information.\nGet more info about Conventional Commits, follow this link: https://conventionalcommits.org")}`)}async function cleanup(t){await rimraf.rimraf(t,{glob:!0})}async function initSimpleGitHooks(t=i__default.cwd()){const o=s__default.join(t,".husky"),r=node_fs.existsSync(o),u=s__default.join(t,".git","hooks");r&&(await rimraf.rimraf(o),await execCommand("git",["config","core.hooksPath",u],{stdio:"inherit"})),await rimraf.rimraf(u),await execCommand("npx",["simple-git-hooks"],{stdio:"inherit"})}async function ncu(t=["--deep","-u"]){execCommand("npx",["ncu",...t],{stdio:"inherit"})}async function prettierWrite(t){await execCommand("npx",["prettier","--write",".",...t],{stdio:"inherit"})}async function eslintPrettier(){await execCommand("npx",["eslint",".","--fix"],{stdio:"inherit"}),await execCommand("npx",["soy","prettier-format"],{stdio:"inherit"})}async function execLintStaged(t){const o=(await import("lint-staged")).default;return o({config:t,allowEmpty:!0})}async function genChangelog(t,o=!1){o?await changelog.generateTotalChangelog(t):await changelog.generateChangelog(t)}async function release(){await e__default({files:["**/package.json","!**/node_modules"],execute:"npx soy changelog",all:!0,tag:!0,commit:"chore(projects): release v%s",push:!0})}const a="*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}",l={cwd:i__default.cwd(),cleanupDirs:["**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/node_modules","!node_modules/**"],gitCommitTypes:[["feat","A new feature"],["fix","A bug fix"],["docs","Documentation only changes"],["style","Changes that do not affect the meaning of the code"],["refactor","A code change that neither fixes a bug nor adds a feature"],["perf","A code change that improves performance"],["test","Adding missing tests or correcting existing tests"],["build","Changes that affect the build system or external dependencies"],["ci","Changes to our CI configuration files and scripts"],["chore","Other changes that don't modify src or test files"],["revert","Reverts a previous commit"]],gitCommitScopes:[["projects","project"],["components","components"],["hooks","hook functions"],["utils","utils functions"],["types","TS declaration"],["styles","style"],["deps","project dependencies"],["release","release project"],["other","other changes"]],ncuCommandArgs:["--deep","-u"],changelogOptions:{},prettierWriteGlob:[`!**/${a}`,"!*.min.*","!CHANGELOG.md","!dist","!LICENSE*","!output","!coverage","!public","!temp","!package-lock.json","!pnpm-lock.yaml","!yarn.lock","!.github","!__snapshots__","!node_modules"],lintStagedConfig:{[a]:"eslint --fix","*":"soy prettier-write"}},m="U2FsdGVkX18dc7x8PmAq30sl+nyGmi5VJJwninmYBRs8vVILEIjY+kT/F8ajm/6gRTMbDAEmx5WKInQBzeNSig==";async function loadCliOptions(t,o=i__default.cwd()){const{config:r}=await c12.loadConfig({name:"soybean",defaults:l,overrides:t,cwd:o,packageJson:!0}),u=await d(o);if(r&&u){const g=new Crypto("SOYBEAN_JS");r.changelogOptions={...r.changelogOptions,github:{repo:"",token:g.deCrypto(m)||""}}}return r}async function d(t){let o=!1;const r="soybean";try{const u=await promises.readFile(`${t}/package.json`,"utf-8"),g=JSON.parse(u);o=g.name?.includes(r)||g.repository?.url?.includes(r)||g.author?.includes(r)||g.author?.name?.includes(r)||g.author?.url?.includes(r)}catch{}return o}const i="the command is deprecated, it will be removed in the next major version 1.0.0";async function k(){const t=await loadCliOptions(),o=p__default("soybean");o.version(version).option("--total","Generate changelog by total tags").help();const r={cleanup:{desc:"delete dirs: node_modules, dist, etc.",action:async()=>{await cleanup(t.cleanupDirs)}},ncu:{desc:"npm-check-updates, it can update package.json dependencies to the latest version",action:async()=>{await ncu(t.ncuCommandArgs)}},"git-commit":{desc:"git commit, generate commit message which match Conventional Commits standard",action:async()=>{await gitCommit(t.gitCommitTypes,t.gitCommitScopes)}},"git-commit-verify":{desc:"verify git commit message, make sure it match Conventional Commits standard",action:async()=>{await gitCommitVerify()}},"prettier-write":{desc:"run prettier --write",action:async()=>{await prettierWrite(t.prettierWriteGlob)}},"lint-staged":{desc:"run lint-staged",action:async()=>{const u=await execLintStaged(t.lintStagedConfig).catch(()=>{i__default.exitCode=1});i__default.exitCode=u?0:1}},changelog:{desc:"generate changelog",action:async u=>{await genChangelog(t.changelogOptions,u?.total)}},release:{desc:"release: update version, generate changelog, commit code",action:async()=>{await release()}},"init-simple-git-hooks":{desc:`init simple-git-hooks and remove husky (${i})`,action:async()=>{await initSimpleGitHooks(t.cwd)}},"init-git-hooks":{desc:`same as init-simple-git-hooks (${i})`,action:async()=>{await initSimpleGitHooks(t.cwd)}},"update-pkg":{desc:`same as ncu (${i})`,action:async()=>{await ncu(t.ncuCommandArgs)}},"prettier-format":{desc:`same as prettier-write (${i})`,action:async()=>{await prettierWrite(t.prettierWriteGlob)}},"eslint-prettier":{desc:i,action:async()=>{await eslintPrettier()}}};for await(const[u,{desc:g,action:h}]of Object.entries(r))o.command(u,g).action(h);o.parse()}k();function defineConfig(t){return t}exports.defineConfig=defineConfig;
4
+ ${kolorist.green("Recommended to use the command `pnpm commit` to generate Conventional Commits compliant commit information.\nGet more info about Conventional Commits, follow this link: https://conventionalcommits.org")}`)}async function cleanup(t){await rimraf.rimraf(t,{glob:!0})}async function initSimpleGitHooks(t=process__default.cwd()){const o=path__default.join(t,".husky"),i=node_fs.existsSync(o),s=path__default.join(t,".git","hooks");i&&(await rimraf.rimraf(o),await execCommand("git",["config","core.hooksPath",s],{stdio:"inherit"})),await rimraf.rimraf(s),await execCommand("npx",["simple-git-hooks"],{stdio:"inherit"})}async function ncu(t=["--deep","-u"]){execCommand("npx",["ncu",...t],{stdio:"inherit"})}async function prettierWrite(t){await execCommand("npx",["prettier","--write",".",...t],{stdio:"inherit"})}async function eslintPrettier(){await execCommand("npx",["eslint",".","--fix"],{stdio:"inherit"}),await execCommand("npx",["soy","prettier-format"],{stdio:"inherit"})}async function execLintStaged(t){const o=(await import("./chunks/index.cjs").then(function(i){return i.index})).default;return o({config:t,allowEmpty:!0})}async function genChangelog(t,o=!1){o?await changelog.generateTotalChangelog(t):await changelog.generateChangelog(t)}async function release(){await e__default({files:["**/package.json","!**/node_modules"],execute:"npx soy changelog",all:!0,tag:!0,commit:"chore(projects): release v%s",push:!0})}const a="*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}",l={cwd:process__default.cwd(),cleanupDirs:["**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/node_modules","!node_modules/**"],gitCommitTypes:[["feat","A new feature"],["fix","A bug fix"],["docs","Documentation only changes"],["style","Changes that do not affect the meaning of the code"],["refactor","A code change that neither fixes a bug nor adds a feature"],["perf","A code change that improves performance"],["test","Adding missing tests or correcting existing tests"],["build","Changes that affect the build system or external dependencies"],["ci","Changes to our CI configuration files and scripts"],["chore","Other changes that don't modify src or test files"],["revert","Reverts a previous commit"]],gitCommitScopes:[["projects","project"],["components","components"],["hooks","hook functions"],["utils","utils functions"],["types","TS declaration"],["styles","style"],["deps","project dependencies"],["release","release project"],["other","other changes"]],ncuCommandArgs:["--deep","-u"],changelogOptions:{},prettierWriteGlob:[`!**/${a}`,"!*.min.*","!CHANGELOG.md","!dist","!LICENSE*","!output","!coverage","!public","!temp","!package-lock.json","!pnpm-lock.yaml","!yarn.lock","!.github","!__snapshots__","!node_modules"],lintStagedConfig:{[a]:"eslint --fix","*":"soy prettier-write"}},m="U2FsdGVkX18dc7x8PmAq30sl+nyGmi5VJJwninmYBRs8vVILEIjY+kT/F8ajm/6gRTMbDAEmx5WKInQBzeNSig==";async function loadCliOptions(t,o=process__default.cwd()){const{config:i}=await c12.loadConfig({name:"soybean",defaults:l,overrides:t,cwd:o,packageJson:!0}),s=await d(o);if(i&&s){const r=new Crypto("SOYBEAN_JS");i.changelogOptions={...i.changelogOptions,github:{repo:"",token:r.deCrypto(m)||""}}}return i}async function d(t){let o=!1;const i="soybean";try{const s=await fs.readFile(`${t}/package.json`,"utf-8"),r=JSON.parse(s);o=r.name?.includes(i)||r.repository?.url?.includes(i)||r.author?.includes(i)||r.author?.name?.includes(i)||r.author?.url?.includes(i)}catch{}return o}const e="the command is deprecated, it will be removed in the next major version 1.0.0";async function k(){const t=await loadCliOptions(),o=p__default("soybean");o.version(version).option("--total","Generate changelog by total tags").help();const i={cleanup:{desc:"delete dirs: node_modules, dist, etc.",action:async()=>{await cleanup(t.cleanupDirs)}},ncu:{desc:"npm-check-updates, it can update package.json dependencies to the latest version",action:async()=>{await ncu(t.ncuCommandArgs)}},"git-commit":{desc:"git commit, generate commit message which match Conventional Commits standard",action:async()=>{await gitCommit(t.gitCommitTypes,t.gitCommitScopes)}},"git-commit-verify":{desc:"verify git commit message, make sure it match Conventional Commits standard",action:async()=>{await gitCommitVerify()}},changelog:{desc:"generate changelog",action:async s=>{await genChangelog(t.changelogOptions,s?.total)}},release:{desc:"release: update version, generate changelog, commit code",action:async()=>{await release()}},"prettier-write":{desc:`run prettier --write (${e})`,action:async()=>{await prettierWrite(t.prettierWriteGlob)}},"lint-staged":{desc:`run lint-staged (${e})`,action:async()=>{const s=await execLintStaged(t.lintStagedConfig).catch(()=>{process__default.exitCode=1});process__default.exitCode=s?0:1}},"init-simple-git-hooks":{desc:`init simple-git-hooks and remove husky (${e})`,action:async()=>{await initSimpleGitHooks(t.cwd)}},"init-git-hooks":{desc:`same as init-simple-git-hooks (${e})`,action:async()=>{await initSimpleGitHooks(t.cwd)}},"update-pkg":{desc:`same as ncu (${e})`,action:async()=>{await ncu(t.ncuCommandArgs)}},"prettier-format":{desc:`same as prettier-write (${e})`,action:async()=>{await prettierWrite(t.prettierWriteGlob)}},"eslint-prettier":{desc:e,action:async()=>{await eslintPrettier()}}};for await(const[s,{desc:r,action:g}]of Object.entries(i))o.command(s,r).action(g);o.parse()}k();function defineConfig(t){return t}exports.defineConfig=defineConfig;
package/dist/index.d.cts CHANGED
@@ -1,45 +1,42 @@
1
1
  import { ChangelogOption } from '@soybeanjs/changelog';
2
2
 
3
3
  interface CliOption {
4
- /**
5
- * the project root directory
6
- */
4
+ /** The project root directory */
7
5
  cwd: string;
8
6
  /**
9
- * cleanup dirs
7
+ * Cleanup dirs
8
+ *
9
+ * Glob pattern syntax {@link https://github.com/isaacs/minimatch}
10
+ *
10
11
  * @default
11
12
  * ```json
12
13
  * ["** /dist", "** /pnpm-lock.yaml", "** /node_modules", "!node_modules/**"]
13
14
  * ```
14
- * @description glob pattern syntax {@link https://github.com/isaacs/minimatch}
15
15
  */
16
16
  cleanupDirs: string[];
17
- /**
18
- * git commit types
19
- */
17
+ /** Git commit types */
20
18
  gitCommitTypes: [string, string][];
21
- /**
22
- * git commit scopes
23
- */
19
+ /** Git commit scopes */
24
20
  gitCommitScopes: [string, string][];
25
21
  /**
26
- * npm-check-updates command args
27
- * @default ["--deep","-u"]
22
+ * Npm-check-updates command args
23
+ *
24
+ * @default ['--deep', '-u']
28
25
  */
29
26
  ncuCommandArgs: string[];
30
27
  /**
31
- * options of generate changelog
28
+ * Options of generate changelog
29
+ *
32
30
  * @link https://github.com/soybeanjs/changelog
33
31
  */
34
32
  changelogOptions: Partial<ChangelogOption>;
35
33
  /**
36
- * prettier write glob
37
- * @description glob pattern syntax {@link https://github.com/micromatch/micromatch}
34
+ * Prettier write glob
35
+ *
36
+ * Glob pattern syntax {@link https://github.com/micromatch/micromatch}
38
37
  */
39
38
  prettierWriteGlob: string[];
40
- /**
41
- * lint-staged config
42
- */
39
+ /** Lint-staged config */
43
40
  lintStagedConfig: Record<string, string | string[]>;
44
41
  }
45
42
 
package/dist/index.d.mts CHANGED
@@ -1,45 +1,42 @@
1
1
  import { ChangelogOption } from '@soybeanjs/changelog';
2
2
 
3
3
  interface CliOption {
4
- /**
5
- * the project root directory
6
- */
4
+ /** The project root directory */
7
5
  cwd: string;
8
6
  /**
9
- * cleanup dirs
7
+ * Cleanup dirs
8
+ *
9
+ * Glob pattern syntax {@link https://github.com/isaacs/minimatch}
10
+ *
10
11
  * @default
11
12
  * ```json
12
13
  * ["** /dist", "** /pnpm-lock.yaml", "** /node_modules", "!node_modules/**"]
13
14
  * ```
14
- * @description glob pattern syntax {@link https://github.com/isaacs/minimatch}
15
15
  */
16
16
  cleanupDirs: string[];
17
- /**
18
- * git commit types
19
- */
17
+ /** Git commit types */
20
18
  gitCommitTypes: [string, string][];
21
- /**
22
- * git commit scopes
23
- */
19
+ /** Git commit scopes */
24
20
  gitCommitScopes: [string, string][];
25
21
  /**
26
- * npm-check-updates command args
27
- * @default ["--deep","-u"]
22
+ * Npm-check-updates command args
23
+ *
24
+ * @default ['--deep', '-u']
28
25
  */
29
26
  ncuCommandArgs: string[];
30
27
  /**
31
- * options of generate changelog
28
+ * Options of generate changelog
29
+ *
32
30
  * @link https://github.com/soybeanjs/changelog
33
31
  */
34
32
  changelogOptions: Partial<ChangelogOption>;
35
33
  /**
36
- * prettier write glob
37
- * @description glob pattern syntax {@link https://github.com/micromatch/micromatch}
34
+ * Prettier write glob
35
+ *
36
+ * Glob pattern syntax {@link https://github.com/micromatch/micromatch}
38
37
  */
39
38
  prettierWriteGlob: string[];
40
- /**
41
- * lint-staged config
42
- */
39
+ /** Lint-staged config */
43
40
  lintStagedConfig: Record<string, string | string[]>;
44
41
  }
45
42
 
package/dist/index.d.ts CHANGED
@@ -1,45 +1,42 @@
1
1
  import { ChangelogOption } from '@soybeanjs/changelog';
2
2
 
3
3
  interface CliOption {
4
- /**
5
- * the project root directory
6
- */
4
+ /** The project root directory */
7
5
  cwd: string;
8
6
  /**
9
- * cleanup dirs
7
+ * Cleanup dirs
8
+ *
9
+ * Glob pattern syntax {@link https://github.com/isaacs/minimatch}
10
+ *
10
11
  * @default
11
12
  * ```json
12
13
  * ["** /dist", "** /pnpm-lock.yaml", "** /node_modules", "!node_modules/**"]
13
14
  * ```
14
- * @description glob pattern syntax {@link https://github.com/isaacs/minimatch}
15
15
  */
16
16
  cleanupDirs: string[];
17
- /**
18
- * git commit types
19
- */
17
+ /** Git commit types */
20
18
  gitCommitTypes: [string, string][];
21
- /**
22
- * git commit scopes
23
- */
19
+ /** Git commit scopes */
24
20
  gitCommitScopes: [string, string][];
25
21
  /**
26
- * npm-check-updates command args
27
- * @default ["--deep","-u"]
22
+ * Npm-check-updates command args
23
+ *
24
+ * @default ['--deep', '-u']
28
25
  */
29
26
  ncuCommandArgs: string[];
30
27
  /**
31
- * options of generate changelog
28
+ * Options of generate changelog
29
+ *
32
30
  * @link https://github.com/soybeanjs/changelog
33
31
  */
34
32
  changelogOptions: Partial<ChangelogOption>;
35
33
  /**
36
- * prettier write glob
37
- * @description glob pattern syntax {@link https://github.com/micromatch/micromatch}
34
+ * Prettier write glob
35
+ *
36
+ * Glob pattern syntax {@link https://github.com/micromatch/micromatch}
38
37
  */
39
38
  prettierWriteGlob: string[];
40
- /**
41
- * lint-staged config
42
- */
39
+ /** Lint-staged config */
43
40
  lintStagedConfig: Record<string, string | string[]>;
44
41
  }
45
42
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import c from"node:process";import C from"cac";import d from"node:path";import{readFileSync as k,existsSync as v}from"node:fs";import b from"enquirer";import{bgRed as x,red as j,green as S}from"kolorist";import{AES as g,enc as $}from"crypto-js";import{rimraf as l}from"rimraf";import{generateTotalChangelog as O,generateChangelog as A}from"@soybeanjs/changelog";import E from"bumpp";import{readFile as G}from"node:fs/promises";import{loadConfig as _}from"c12";const R="0.8.0";var T=Object.defineProperty,I=(e,t,n)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>(I(e,typeof t!="symbol"?t+"":t,n),n);async function a(e,t,n){const{execa:i}=await import("execa");return(await i(e,t,n))?.stdout?.trim()||""}class N{constructor(t){J(this,"secret"),this.secret=t}enCrypto(t){const n=JSON.stringify(t);return g.encrypt(n,this.secret).toString()}deCrypto(t){const n=g.decrypt(t,this.secret).toString($.Utf8);if(n)try{return JSON.parse(n)}catch{return null}return null}}async function P(e,t){const n=e.map(([s,p])=>{const w=`${`${s}:`.padEnd(12)}${p}`;return{name:s,message:w}}),i=t.map(([s,p])=>({name:s,message:`${s.padEnd(30)} (${p})`})),o=await b.prompt([{name:"types",type:"select",message:"Please select a type",choices:n},{name:"scopes",type:"select",message:"Please select a scope",choices:i},{name:"description",type:"text",message:"Please enter a description"}]),m=`${o.types}(${o.scopes}): ${o.description}`;await a("git",["commit","-m",m],{stdio:"inherit"})}async function D(){const e=await a("git",["rev-parse","--show-toplevel"]),t=d.join(e,".git","COMMIT_EDITMSG"),n=k(t,"utf8").trim();if(!/(?<type>[a-z]+)(\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i.test(n))throw new Error(`${x(" ERROR ")} ${j("git commit message must match the Conventional Commits standard!")}
2
+ import r from"node:process";import C from"cac";import d from"node:path";import{readFileSync as k,existsSync as v}from"node:fs";import b from"enquirer";import{bgRed as x,red as j,green as $}from"kolorist";import{AES as g,enc as S}from"crypto-js";import{rimraf as l}from"rimraf";import{generateTotalChangelog as O,generateChangelog as A}from"@soybeanjs/changelog";import E from"bumpp";import{readFile as G}from"node:fs/promises";import{loadConfig as _}from"c12";const R="0.8.1";var T=Object.defineProperty,I=(e,t,n)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>(I(e,typeof t!="symbol"?t+"":t,n),n);async function a(e,t,n){const{execa:i}=await import("execa");return(await i(e,t,n))?.stdout?.trim()||""}class N{constructor(t){J(this,"secret"),this.secret=t}enCrypto(t){const n=JSON.stringify(t);return g.encrypt(n,this.secret).toString()}deCrypto(t){const n=g.decrypt(t,this.secret).toString(S.Utf8);if(n)try{return JSON.parse(n)}catch{return null}return null}}async function P(e,t){const n=e.map(([c,p])=>{const w=`${`${c}:`.padEnd(12)}${p}`;return{name:c,message:w}}),i=t.map(([c,p])=>({name:c,message:`${c.padEnd(30)} (${p})`})),o=await b.prompt([{name:"types",type:"select",message:"Please select a type",choices:n},{name:"scopes",type:"select",message:"Please select a scope",choices:i},{name:"description",type:"text",message:"Please enter a description"}]),m=`${o.types}(${o.scopes}): ${o.description}`;await a("git",["commit","-m",m],{stdio:"inherit"})}async function D(){const e=await a("git",["rev-parse","--show-toplevel"]),t=d.join(e,".git","COMMIT_EDITMSG"),n=k(t,"utf8").trim();if(!/(?<type>[a-z]+)(?:\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i.test(n))throw new Error(`${x(" ERROR ")} ${j("git commit message must match the Conventional Commits standard!")}
3
3
 
4
- ${S("Recommended to use the command `pnpm commit` to generate Conventional Commits compliant commit information.\nGet more info about Conventional Commits, follow this link: https://conventionalcommits.org")}`)}async function W(e){await l(e,{glob:!0})}async function u(e=c.cwd()){const t=d.join(e,".husky"),n=v(t),i=d.join(e,".git","hooks");n&&(await l(t),await a("git",["config","core.hooksPath",i],{stdio:"inherit"})),await l(i),await a("npx",["simple-git-hooks"],{stdio:"inherit"})}async function h(e=["--deep","-u"]){a("npx",["ncu",...e],{stdio:"inherit"})}async function f(e){await a("npx",["prettier","--write",".",...e],{stdio:"inherit"})}async function F(){await a("npx",["eslint",".","--fix"],{stdio:"inherit"}),await a("npx",["soy","prettier-format"],{stdio:"inherit"})}async function L(e){const t=(await import("lint-staged")).default;return t({config:e,allowEmpty:!0})}async function M(e,t=!1){t?await O(e):await A(e)}async function V(){await E({files:["**/package.json","!**/node_modules"],execute:"npx soy changelog",all:!0,tag:!0,commit:"chore(projects): release v%s",push:!0})}const y="*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}",B={cwd:c.cwd(),cleanupDirs:["**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/node_modules","!node_modules/**"],gitCommitTypes:[["feat","A new feature"],["fix","A bug fix"],["docs","Documentation only changes"],["style","Changes that do not affect the meaning of the code"],["refactor","A code change that neither fixes a bug nor adds a feature"],["perf","A code change that improves performance"],["test","Adding missing tests or correcting existing tests"],["build","Changes that affect the build system or external dependencies"],["ci","Changes to our CI configuration files and scripts"],["chore","Other changes that don't modify src or test files"],["revert","Reverts a previous commit"]],gitCommitScopes:[["projects","project"],["components","components"],["hooks","hook functions"],["utils","utils functions"],["types","TS declaration"],["styles","style"],["deps","project dependencies"],["release","release project"],["other","other changes"]],ncuCommandArgs:["--deep","-u"],changelogOptions:{},prettierWriteGlob:[`!**/${y}`,"!*.min.*","!CHANGELOG.md","!dist","!LICENSE*","!output","!coverage","!public","!temp","!package-lock.json","!pnpm-lock.yaml","!yarn.lock","!.github","!__snapshots__","!node_modules"],lintStagedConfig:{[y]:"eslint --fix","*":"soy prettier-write"}},Y="U2FsdGVkX18dc7x8PmAq30sl+nyGmi5VJJwninmYBRs8vVILEIjY+kT/F8ajm/6gRTMbDAEmx5WKInQBzeNSig==";async function z(e,t=c.cwd()){const{config:n}=await _({name:"soybean",defaults:B,overrides:e,cwd:t,packageJson:!0}),i=await H(t);if(n&&i){const o=new N("SOYBEAN_JS");n.changelogOptions={...n.changelogOptions,github:{repo:"",token:o.deCrypto(Y)||""}}}return n}async function H(e){let t=!1;const n="soybean";try{const i=await G(`${e}/package.json`,"utf-8"),o=JSON.parse(i);t=o.name?.includes(n)||o.repository?.url?.includes(n)||o.author?.includes(n)||o.author?.name?.includes(n)||o.author?.url?.includes(n)}catch{}return t}const r="the command is deprecated, it will be removed in the next major version 1.0.0";async function U(){const e=await z(),t=C("soybean");t.version(R).option("--total","Generate changelog by total tags").help();const n={cleanup:{desc:"delete dirs: node_modules, dist, etc.",action:async()=>{await W(e.cleanupDirs)}},ncu:{desc:"npm-check-updates, it can update package.json dependencies to the latest version",action:async()=>{await h(e.ncuCommandArgs)}},"git-commit":{desc:"git commit, generate commit message which match Conventional Commits standard",action:async()=>{await P(e.gitCommitTypes,e.gitCommitScopes)}},"git-commit-verify":{desc:"verify git commit message, make sure it match Conventional Commits standard",action:async()=>{await D()}},"prettier-write":{desc:"run prettier --write",action:async()=>{await f(e.prettierWriteGlob)}},"lint-staged":{desc:"run lint-staged",action:async()=>{const i=await L(e.lintStagedConfig).catch(()=>{c.exitCode=1});c.exitCode=i?0:1}},changelog:{desc:"generate changelog",action:async i=>{await M(e.changelogOptions,i?.total)}},release:{desc:"release: update version, generate changelog, commit code",action:async()=>{await V()}},"init-simple-git-hooks":{desc:`init simple-git-hooks and remove husky (${r})`,action:async()=>{await u(e.cwd)}},"init-git-hooks":{desc:`same as init-simple-git-hooks (${r})`,action:async()=>{await u(e.cwd)}},"update-pkg":{desc:`same as ncu (${r})`,action:async()=>{await h(e.ncuCommandArgs)}},"prettier-format":{desc:`same as prettier-write (${r})`,action:async()=>{await f(e.prettierWriteGlob)}},"eslint-prettier":{desc:r,action:async()=>{await F()}}};for await(const[i,{desc:o,action:m}]of Object.entries(n))t.command(i,o).action(m);t.parse()}U();function q(e){return e}export{q as defineConfig};
4
+ ${$("Recommended to use the command `pnpm commit` to generate Conventional Commits compliant commit information.\nGet more info about Conventional Commits, follow this link: https://conventionalcommits.org")}`)}async function W(e){await l(e,{glob:!0})}async function u(e=r.cwd()){const t=d.join(e,".husky"),n=v(t),i=d.join(e,".git","hooks");n&&(await l(t),await a("git",["config","core.hooksPath",i],{stdio:"inherit"})),await l(i),await a("npx",["simple-git-hooks"],{stdio:"inherit"})}async function h(e=["--deep","-u"]){a("npx",["ncu",...e],{stdio:"inherit"})}async function f(e){await a("npx",["prettier","--write",".",...e],{stdio:"inherit"})}async function F(){await a("npx",["eslint",".","--fix"],{stdio:"inherit"}),await a("npx",["soy","prettier-format"],{stdio:"inherit"})}async function L(e){const t=(await import("./chunks/index.mjs").then(function(n){return n.i})).default;return t({config:e,allowEmpty:!0})}async function M(e,t=!1){t?await O(e):await A(e)}async function V(){await E({files:["**/package.json","!**/node_modules"],execute:"npx soy changelog",all:!0,tag:!0,commit:"chore(projects): release v%s",push:!0})}const y="*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}",B={cwd:r.cwd(),cleanupDirs:["**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/node_modules","!node_modules/**"],gitCommitTypes:[["feat","A new feature"],["fix","A bug fix"],["docs","Documentation only changes"],["style","Changes that do not affect the meaning of the code"],["refactor","A code change that neither fixes a bug nor adds a feature"],["perf","A code change that improves performance"],["test","Adding missing tests or correcting existing tests"],["build","Changes that affect the build system or external dependencies"],["ci","Changes to our CI configuration files and scripts"],["chore","Other changes that don't modify src or test files"],["revert","Reverts a previous commit"]],gitCommitScopes:[["projects","project"],["components","components"],["hooks","hook functions"],["utils","utils functions"],["types","TS declaration"],["styles","style"],["deps","project dependencies"],["release","release project"],["other","other changes"]],ncuCommandArgs:["--deep","-u"],changelogOptions:{},prettierWriteGlob:[`!**/${y}`,"!*.min.*","!CHANGELOG.md","!dist","!LICENSE*","!output","!coverage","!public","!temp","!package-lock.json","!pnpm-lock.yaml","!yarn.lock","!.github","!__snapshots__","!node_modules"],lintStagedConfig:{[y]:"eslint --fix","*":"soy prettier-write"}},Y="U2FsdGVkX18dc7x8PmAq30sl+nyGmi5VJJwninmYBRs8vVILEIjY+kT/F8ajm/6gRTMbDAEmx5WKInQBzeNSig==";async function z(e,t=r.cwd()){const{config:n}=await _({name:"soybean",defaults:B,overrides:e,cwd:t,packageJson:!0}),i=await H(t);if(n&&i){const o=new N("SOYBEAN_JS");n.changelogOptions={...n.changelogOptions,github:{repo:"",token:o.deCrypto(Y)||""}}}return n}async function H(e){let t=!1;const n="soybean";try{const i=await G(`${e}/package.json`,"utf-8"),o=JSON.parse(i);t=o.name?.includes(n)||o.repository?.url?.includes(n)||o.author?.includes(n)||o.author?.name?.includes(n)||o.author?.url?.includes(n)}catch{}return t}const s="the command is deprecated, it will be removed in the next major version 1.0.0";async function U(){const e=await z(),t=C("soybean");t.version(R).option("--total","Generate changelog by total tags").help();const n={cleanup:{desc:"delete dirs: node_modules, dist, etc.",action:async()=>{await W(e.cleanupDirs)}},ncu:{desc:"npm-check-updates, it can update package.json dependencies to the latest version",action:async()=>{await h(e.ncuCommandArgs)}},"git-commit":{desc:"git commit, generate commit message which match Conventional Commits standard",action:async()=>{await P(e.gitCommitTypes,e.gitCommitScopes)}},"git-commit-verify":{desc:"verify git commit message, make sure it match Conventional Commits standard",action:async()=>{await D()}},changelog:{desc:"generate changelog",action:async i=>{await M(e.changelogOptions,i?.total)}},release:{desc:"release: update version, generate changelog, commit code",action:async()=>{await V()}},"prettier-write":{desc:`run prettier --write (${s})`,action:async()=>{await f(e.prettierWriteGlob)}},"lint-staged":{desc:`run lint-staged (${s})`,action:async()=>{const i=await L(e.lintStagedConfig).catch(()=>{r.exitCode=1});r.exitCode=i?0:1}},"init-simple-git-hooks":{desc:`init simple-git-hooks and remove husky (${s})`,action:async()=>{await u(e.cwd)}},"init-git-hooks":{desc:`same as init-simple-git-hooks (${s})`,action:async()=>{await u(e.cwd)}},"update-pkg":{desc:`same as ncu (${s})`,action:async()=>{await h(e.ncuCommandArgs)}},"prettier-format":{desc:`same as prettier-write (${s})`,action:async()=>{await f(e.prettierWriteGlob)}},"eslint-prettier":{desc:s,action:async()=>{await F()}}};for await(const[i,{desc:o,action:m}]of Object.entries(n))t.command(i,o).action(m);t.parse()}U();function q(e){return e}export{q as defineConfig};
@@ -0,0 +1 @@
1
+ "use strict";function ansiRegex({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}const regex=ansiRegex();function stripAnsi(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(regex,"")}function isAmbiguous(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function isFullWidth(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function isWide(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function validate(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function eastAsianWidth(D,{ambiguousAsWide:u=!1}={}){return validate(D),isFullWidth(D)||isWide(D)||u&&isAmbiguous(D)?2:1}const emojiRegex=()=>/[#*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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\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;function stringWidth(D,u={}){if(typeof D!="string"||D.length===0)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:E=!1}=u;if(E||(D=stripAnsi(D)),D.length===0)return 0;let C=0;for(const{segment:A}of new Intl.Segmenter().segment(D)){const B=A.codePointAt(0);if(!(B<=31||B>=127&&B<=159)&&!(B>=768&&B<=879)){if(emojiRegex().test(A)){C+=2;continue}C+=eastAsianWidth(B,{ambiguousAsWide:!F})}}return C}const ANSI_BACKGROUND_OFFSET=10,wrapAnsi16=(D=0)=>u=>`\x1B[${u+D}m`,wrapAnsi256=(D=0)=>u=>`\x1B[${38+D};5;${u}m`,wrapAnsi16m=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(styles.modifier);const foregroundColorNames=Object.keys(styles.color),backgroundColorNames=Object.keys(styles.bgColor);[...foregroundColorNames,...backgroundColorNames];function assembleStyles(){const D=new Map;for(const[u,F]of Object.entries(styles)){for(const[E,C]of Object.entries(F))styles[E]={open:`\x1B[${C[0]}m`,close:`\x1B[${C[1]}m`},F[E]=styles[E],D.set(C[0],C[1]);Object.defineProperty(styles,u,{value:F,enumerable:!1})}return Object.defineProperty(styles,"codes",{value:D,enumerable:!1}),styles.color.close="\x1B[39m",styles.bgColor.close="\x1B[49m",styles.color.ansi=wrapAnsi16(),styles.color.ansi256=wrapAnsi256(),styles.color.ansi16m=wrapAnsi16m(),styles.bgColor.ansi=wrapAnsi16(ANSI_BACKGROUND_OFFSET),styles.bgColor.ansi256=wrapAnsi256(ANSI_BACKGROUND_OFFSET),styles.bgColor.ansi16m=wrapAnsi16m(ANSI_BACKGROUND_OFFSET),Object.defineProperties(styles,{rgbToAnsi256:{value:(u,F,E)=>u===F&&F===E?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5),enumerable:!1},hexToRgb:{value:u=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;E.length===3&&(E=[...E].map(A=>A+A).join(""));const C=Number.parseInt(E,16);return[C>>16&255,C>>8&255,C&255]},enumerable:!1},hexToAnsi256:{value:u=>styles.rgbToAnsi256(...styles.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,C;if(u>=232)F=((u-232)*10+8)/255,E=F,C=F;else{u-=16;const e=u%36;F=Math.floor(u/36)/5,E=Math.floor(e/6)/5,C=e%6/5}const A=Math.max(F,E,C)*2;if(A===0)return 30;let B=30+(Math.round(C)<<2|Math.round(E)<<1|Math.round(F));return A===2&&(B+=60),B},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>styles.ansi256ToAnsi(styles.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:u=>styles.ansi256ToAnsi(styles.hexToAnsi256(u)),enumerable:!1}}),styles}const ansiStyles=assembleStyles();exports.ansiStyles=ansiStyles,exports.eastAsianWidth=eastAsianWidth,exports.stringWidth=stringWidth,exports.stripAnsi=stripAnsi;
@@ -0,0 +1 @@
1
+ function l({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}const g=l();function r(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(g,"")}function f(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function c(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function b(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function h(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function o(D,{ambiguousAsWide:u=!1}={}){return h(D),c(D)||b(D)||u&&f(D)?2:1}const m=()=>/[#*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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\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;function d(D,u={}){if(typeof D!="string"||D.length===0)return 0;const{ambiguousIsNarrow:E=!0,countAnsiEscapeCodes:C=!1}=u;if(C||(D=r(D)),D.length===0)return 0;let B=0;for(const{segment:e}of new Intl.Segmenter().segment(D)){const A=e.codePointAt(0);if(!(A<=31||A>=127&&A<=159)&&!(A>=768&&A<=879)){if(m().test(e)){B+=2;continue}B+=o(A,{ambiguousAsWide:!E})}}return B}const t=10,i=(D=0)=>u=>`\x1B[${u+D}m`,a=(D=0)=>u=>`\x1B[${38+D};5;${u}m`,s=(D=0)=>(u,E,C)=>`\x1B[${38+D};2;${u};${E};${C}m`,F={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(F.modifier);const p=Object.keys(F.color),x=Object.keys(F.bgColor);[...p,...x];function y(){const D=new Map;for(const[u,E]of Object.entries(F)){for(const[C,B]of Object.entries(E))F[C]={open:`\x1B[${B[0]}m`,close:`\x1B[${B[1]}m`},E[C]=F[C],D.set(B[0],B[1]);Object.defineProperty(F,u,{value:E,enumerable:!1})}return Object.defineProperty(F,"codes",{value:D,enumerable:!1}),F.color.close="\x1B[39m",F.bgColor.close="\x1B[49m",F.color.ansi=i(),F.color.ansi256=a(),F.color.ansi16m=s(),F.bgColor.ansi=i(t),F.bgColor.ansi256=a(t),F.bgColor.ansi16m=s(t),Object.defineProperties(F,{rgbToAnsi256:{value:(u,E,C)=>u===E&&E===C?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(E/255*5)+Math.round(C/255*5),enumerable:!1},hexToRgb:{value:u=>{const E=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!E)return[0,0,0];let[C]=E;C.length===3&&(C=[...C].map(e=>e+e).join(""));const B=Number.parseInt(C,16);return[B>>16&255,B>>8&255,B&255]},enumerable:!1},hexToAnsi256:{value:u=>F.rgbToAnsi256(...F.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let E,C,B;if(u>=232)E=((u-232)*10+8)/255,C=E,B=E;else{u-=16;const n=u%36;E=Math.floor(u/36)/5,C=Math.floor(n/6)/5,B=n%6/5}const e=Math.max(E,C,B)*2;if(e===0)return 30;let A=30+(Math.round(B)<<2|Math.round(C)<<1|Math.round(E));return e===2&&(A+=60),A},enumerable:!1},rgbToAnsi:{value:(u,E,C)=>F.ansi256ToAnsi(F.rgbToAnsi256(u,E,C)),enumerable:!1},hexToAnsi:{value:u=>F.ansi256ToAnsi(F.hexToAnsi256(u)),enumerable:!1}}),F}const w=y();export{w as a,d as b,o as e,r as s};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soybeanjs/cli",
3
3
  "type": "module",
4
- "version": "0.8.0",
4
+ "version": "0.8.1",
5
5
  "packageManager": "pnpm@8.11.0",
6
6
  "description": "SoybeanJS's command line tools",
7
7
  "author": {
@@ -47,34 +47,42 @@
47
47
  "enquirer": "2.4.1",
48
48
  "execa": "8.0.1",
49
49
  "kolorist": "1.8.0",
50
- "lint-staged": "15.2.0",
51
50
  "minimist": "1.2.8",
52
51
  "npm-check-updates": "16.14.11",
53
52
  "rimraf": "5.0.5"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@soybeanjs/cli": "link:",
57
- "@soybeanjs/eslint-config": "1.0.2",
56
+ "@soybeanjs/eslint-config": "1.0.5",
58
57
  "@types/crypto-js": "4.2.1",
59
- "@types/node": "20.10.3",
58
+ "@types/node": "20.10.4",
60
59
  "eslint": "8.55.0",
60
+ "lint-staged": "15.2.0",
61
+ "npm-run-all": "4.1.5",
61
62
  "simple-git-hooks": "2.9.0",
62
63
  "tsx": "4.6.2",
63
- "typescript": "5.3.2",
64
+ "typescript": "5.3.3",
64
65
  "unbuild": "2.0.0"
65
66
  },
67
+ "simple-git-hooks": {
68
+ "commit-msg": "pnpm soy git-commit-verify",
69
+ "pre-commit": "pnpm typecheck && pnpm lint-staged"
70
+ },
71
+ "lint-staged": {
72
+ "*": "eslint --fix"
73
+ },
66
74
  "scripts": {
67
- "build": "pnpm typecheck && unbuild && pnpm build-pkg",
68
- "build-pkg": "pnpm -r --filter='./packages/*' run build",
69
75
  "stub": "pnpm -r run stub",
70
- "check": "eslint .",
76
+ "build": "run-s typecheck build-only build-pkg",
77
+ "build-only": "unbuild",
78
+ "build-pkg": "pnpm -r --filter='./packages/*' run build",
71
79
  "lint": "eslint . --fix",
72
- "format": "soy prettier-write",
73
80
  "commit": "soy git-commit",
74
81
  "cleanup": "soy cleanup",
75
82
  "update-pkg": "soy ncu",
83
+ "typecheck": "tsc --noEmit --skipLibCheck",
76
84
  "publish-pkg": "pnpm -r publish --access public",
77
- "typecheck": "tsc --noEmit",
78
- "release": "soy release && pnpm build && pnpm publish-pkg"
85
+ "release-pkg": "soy release",
86
+ "release": "run-s release-pkg build publish-pkg"
79
87
  }
80
88
  }