mdat 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var dS=Object.create;var Gh=Object.defineProperty;var hS=Object.getOwnPropertyDescriptor;var pS=Object.getOwnPropertyNames;var mS=Object.getPrototypeOf,gS=Object.prototype.hasOwnProperty;var Tn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var qh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ES=(e,t)=>{for(var n in t)Gh(e,n,{get:t[n],enumerable:!0})},DS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pS(t))!gS.call(e,i)&&i!==n&&Gh(e,i,{get:()=>t[i],enumerable:!(r=hS(t,i))||r.enumerable});return e};var XE=(e,t,n)=>(n=e!=null?dS(mS(e)):{},DS(t||!e||!e.__esModule?Gh(n,"default",{value:e,enumerable:!0}):n,e));var ED=qh(($Y,WS)=>{WS.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var AD=qh((VY,DD)=>{"use strict";var YS=ED();DD.exports=new Map(Object.entries(YS))});var _T=qh((one,yT)=>{"use strict";var vf=Object.prototype.hasOwnProperty,xT=Object.prototype.toString,gT=Object.defineProperty,ET=Object.getOwnPropertyDescriptor,DT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):xT.call(t)==="[object Array]"},AT=function(t){if(!t||xT.call(t)!=="[object Object]")return!1;var n=vf.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&vf.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||vf.call(t,i)},CT=function(t,n){gT&&n.name==="__proto__"?gT(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},TT=function(t,n){if(n==="__proto__")if(vf.call(t,n)){if(ET)return ET(t,n).value}else return;return t[n]};yT.exports=function e(){var t,n,r,i,u,s,o=arguments[0],a=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},a=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});a<l;++a)if(t=arguments[a],t!=null)for(n in t)r=TT(o,n),i=TT(t,n),o!==i&&(c&&i&&(AT(i)||(u=DT(i)))?(u?(u=!1,s=r&&DT(r)?r:[]):s=r&&AT(r)?r:{},CT(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&CT(o,{name:n,newValue:i}));return o}});var JE="0.7.0";import{defaultLoaders as CS}from"cosmiconfig";function zh(e,t){let n=CS[".json"],r=n(e,t);return eD(r)}function eD(e,t="",n={}){for(let[r,i]of Object.entries(e)){let u=t?`${t}.${r}`:r;typeof i=="object"&&i!==null&&!Array.isArray(i)?eD(i,u,n):i===null?n[u]="null":n[u]=i.toString()}return n}import IS from"node:fs";import Ci from"node:path";import bS from"node:process";import TS from"node:process";import xS from"node:fs/promises";import{fileURLToPath as yS}from"node:url";import Gs from"node:path";var tD=e=>e instanceof URL?yS(e):e;async function cc(e,{cwd:t=TS.cwd(),type:n="file",stopAt:r}={}){let i=Gs.resolve(tD(t)??""),{root:u}=Gs.parse(i);for(r=Gs.resolve(i,tD(r??u));i&&i!==r&&i!==u;){let s=Gs.isAbsolute(e)?e:Gs.join(i,e);try{let o=await xS.stat(s);if(n==="file"&&o.isFile()||n==="directory"&&o.isDirectory())return s}catch{}i=Gs.dirname(i)}}async function nD({cwd:e=bS.cwd()}={}){return cc("package.json",{cwd:e})}import FS,{promises as kS}from"fs";async function $h(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return(await kS[e](n))[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}function Vh(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return FS[e](n)[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}var qs=$h.bind(null,"stat","isFile"),AY=$h.bind(null,"stat","isDirectory"),CY=$h.bind(null,"lstat","isSymbolicLink"),Wh=Vh.bind(null,"statSync","isFile"),TY=Vh.bind(null,"statSync","isDirectory"),xY=Vh.bind(null,"lstatSync","isSymbolicLink");import SS from"node:os";var rD=SS.homedir();function Yh(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return rD?e.replace(/^~(?=$|\/|\\)/,rD):e}function vS(e,t){let n=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(n,"0")}function uD(e,t,n,r){let i=[];for(let[u,s]of e.entries()){let o=n&&e.length>1?`-${vS(u+1,e.length+1)}`:"",a=OS(s,t,n,r,o);i.push(a)}return i}function OS(e,t,n,r,i=""){let u=iD(e),s=t?iD(t):void 0;if(!Wh(u))throw new Error(`Input file not found: "${u}"`);if(s){if(Wh(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);IS.mkdirSync(s,{recursive:!0})}let o=n?Ci.basename(n,Ci.extname(n)):Ci.basename(u,Ci.extname(u)),a=`.${r??(n&&Ci.extname(n)!==""?Ci.extname(n):Ci.extname(e)===""?"":Ci.extname(e))}`,l=`${o}${i}${a}`,c=s??Ci.dirname(u);return{input:u,name:l,output:c}}function iD(e){return Yh(e)}async function fc(){return nD()}function dc(e){return e==null?[]:Array.isArray(e)?e:[e]}var sD=(e=0)=>t=>`\x1B[${t+e}m`,oD=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,aD=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,St={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]}},BY=Object.keys(St.modifier),BS=Object.keys(St.color),wS=Object.keys(St.bgColor),wY=[...BS,...wS];function NS(){let e=new Map;for(let[t,n]of Object.entries(St)){for(let[r,i]of Object.entries(n))St[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[r]=St[r],e.set(i[0],i[1]);Object.defineProperty(St,t,{value:n,enumerable:!1})}return Object.defineProperty(St,"codes",{value:e,enumerable:!1}),St.color.close="\x1B[39m",St.bgColor.close="\x1B[49m",St.color.ansi=sD(),St.color.ansi256=oD(),St.color.ansi16m=aD(),St.bgColor.ansi=sD(10),St.bgColor.ansi256=oD(10),St.bgColor.ansi16m=aD(10),Object.defineProperties(St,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(u=>u+u).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>St.rgbToAnsi256(...St.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,i;if(t>=232)n=((t-232)*10+8)/255,r=n,i=n;else{t-=16;let o=t%36;n=Math.floor(t/36)/5,r=Math.floor(o/6)/5,i=o%6/5}let u=Math.max(n,r,i)*2;if(u===0)return 30;let s=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(n));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>St.ansi256ToAnsi(St.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>St.ansi256ToAnsi(St.hexToAnsi256(t)),enumerable:!1}}),St}var RS=NS(),wr=RS;import Kh from"node:process";import LS from"node:os";import lD from"node:tty";function mr(e,t=globalThis.Deno?globalThis.Deno.args:Kh.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:Nt}=Kh,hc;mr("no-color")||mr("no-colors")||mr("color=false")||mr("color=never")?hc=0:(mr("color")||mr("colors")||mr("color=true")||mr("color=always"))&&(hc=1);function PS(){if("FORCE_COLOR"in Nt)return Nt.FORCE_COLOR==="true"?1:Nt.FORCE_COLOR==="false"?0:Nt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Nt.FORCE_COLOR,10),3)}function MS(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function US(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=PS();r!==void 0&&(hc=r);let i=n?hc:r;if(i===0)return 0;if(n){if(mr("color=16m")||mr("color=full")||mr("color=truecolor"))return 3;if(mr("color=256"))return 2}if("TF_BUILD"in Nt&&"AGENT_NAME"in Nt)return 1;if(e&&!t&&i===void 0)return 0;let u=i||0;if(Nt.TERM==="dumb")return u;if(Kh.platform==="win32"){let s=LS.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in Nt)return"GITHUB_ACTIONS"in Nt||"GITEA_ACTIONS"in Nt?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in Nt)||Nt.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in Nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Nt.TEAMCITY_VERSION)?1:0;if(Nt.COLORTERM==="truecolor"||Nt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Nt){let s=Number.parseInt((Nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Nt.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Nt.TERM)||"COLORTERM"in Nt?1:u}function cD(e,t={}){let n=US(e,{streamIsTTY:e&&e.isTTY,...t});return MS(n)}var HS={stdout:cD({isTTY:lD.isatty(1)}),stderr:cD({isTTY:lD.isatty(2)})},fD=HS;function dD(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,u=0,s="";do s+=e.slice(u,r)+t+n,u=r+i,r=e.indexOf(t,u);while(r!==-1);return s+=e.slice(u),s}function hD(e,t,n,r){let i=0,u="";do{let s=e[r-1]==="\r";u+=e.slice(i,s?r-1:r)+t+(s?`\r
2
+ var dS=Object.create;var Gh=Object.defineProperty;var hS=Object.getOwnPropertyDescriptor;var pS=Object.getOwnPropertyNames;var mS=Object.getPrototypeOf,gS=Object.prototype.hasOwnProperty;var Tn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var qh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ES=(e,t)=>{for(var n in t)Gh(e,n,{get:t[n],enumerable:!0})},DS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pS(t))!gS.call(e,i)&&i!==n&&Gh(e,i,{get:()=>t[i],enumerable:!(r=hS(t,i))||r.enumerable});return e};var XE=(e,t,n)=>(n=e!=null?dS(mS(e)):{},DS(t||!e||!e.__esModule?Gh(n,"default",{value:e,enumerable:!0}):n,e));var ED=qh(($Y,WS)=>{WS.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var AD=qh((VY,DD)=>{"use strict";var YS=ED();DD.exports=new Map(Object.entries(YS))});var _T=qh((one,yT)=>{"use strict";var vf=Object.prototype.hasOwnProperty,xT=Object.prototype.toString,gT=Object.defineProperty,ET=Object.getOwnPropertyDescriptor,DT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):xT.call(t)==="[object Array]"},AT=function(t){if(!t||xT.call(t)!=="[object Object]")return!1;var n=vf.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&vf.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||vf.call(t,i)},CT=function(t,n){gT&&n.name==="__proto__"?gT(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},TT=function(t,n){if(n==="__proto__")if(vf.call(t,n)){if(ET)return ET(t,n).value}else return;return t[n]};yT.exports=function e(){var t,n,r,i,u,s,o=arguments[0],a=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},a=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});a<l;++a)if(t=arguments[a],t!=null)for(n in t)r=TT(o,n),i=TT(t,n),o!==i&&(c&&i&&(AT(i)||(u=DT(i)))?(u?(u=!1,s=r&&DT(r)?r:[]):s=r&&AT(r)?r:{},CT(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&CT(o,{name:n,newValue:i}));return o}});var JE="0.7.2";import{defaultLoaders as CS}from"cosmiconfig";function zh(e,t){let n=CS[".json"],r=n(e,t);return eD(r)}function eD(e,t="",n={}){for(let[r,i]of Object.entries(e)){let u=t?`${t}.${r}`:r;typeof i=="object"&&i!==null&&!Array.isArray(i)?eD(i,u,n):i===null?n[u]="null":n[u]=i.toString()}return n}import IS from"node:fs";import Ci from"node:path";import bS from"node:process";import TS from"node:process";import xS from"node:fs/promises";import{fileURLToPath as yS}from"node:url";import Gs from"node:path";var tD=e=>e instanceof URL?yS(e):e;async function cc(e,{cwd:t=TS.cwd(),type:n="file",stopAt:r}={}){let i=Gs.resolve(tD(t)??""),{root:u}=Gs.parse(i);for(r=Gs.resolve(i,tD(r??u));i&&i!==r&&i!==u;){let s=Gs.isAbsolute(e)?e:Gs.join(i,e);try{let o=await xS.stat(s);if(n==="file"&&o.isFile()||n==="directory"&&o.isDirectory())return s}catch{}i=Gs.dirname(i)}}async function nD({cwd:e=bS.cwd()}={}){return cc("package.json",{cwd:e})}import FS,{promises as kS}from"fs";async function $h(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return(await kS[e](n))[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}function Vh(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return FS[e](n)[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}var qs=$h.bind(null,"stat","isFile"),AY=$h.bind(null,"stat","isDirectory"),CY=$h.bind(null,"lstat","isSymbolicLink"),Wh=Vh.bind(null,"statSync","isFile"),TY=Vh.bind(null,"statSync","isDirectory"),xY=Vh.bind(null,"lstatSync","isSymbolicLink");import SS from"node:os";var rD=SS.homedir();function Yh(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return rD?e.replace(/^~(?=$|\/|\\)/,rD):e}function vS(e,t){let n=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(n,"0")}function uD(e,t,n,r){let i=[];for(let[u,s]of e.entries()){let o=n&&e.length>1?`-${vS(u+1,e.length+1)}`:"",a=OS(s,t,n,r,o);i.push(a)}return i}function OS(e,t,n,r,i=""){let u=iD(e),s=t?iD(t):void 0;if(!Wh(u))throw new Error(`Input file not found: "${u}"`);if(s){if(Wh(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);IS.mkdirSync(s,{recursive:!0})}let o=n?Ci.basename(n,Ci.extname(n)):Ci.basename(u,Ci.extname(u)),a=`.${r??(n&&Ci.extname(n)!==""?Ci.extname(n):Ci.extname(e)===""?"":Ci.extname(e))}`,l=`${o}${i}${a}`,c=s??Ci.dirname(u);return{input:u,name:l,output:c}}function iD(e){return Yh(e)}async function fc(){return nD()}function dc(e){return e==null?[]:Array.isArray(e)?e:[e]}var sD=(e=0)=>t=>`\x1B[${t+e}m`,oD=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,aD=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,St={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]}},BY=Object.keys(St.modifier),BS=Object.keys(St.color),wS=Object.keys(St.bgColor),wY=[...BS,...wS];function NS(){let e=new Map;for(let[t,n]of Object.entries(St)){for(let[r,i]of Object.entries(n))St[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[r]=St[r],e.set(i[0],i[1]);Object.defineProperty(St,t,{value:n,enumerable:!1})}return Object.defineProperty(St,"codes",{value:e,enumerable:!1}),St.color.close="\x1B[39m",St.bgColor.close="\x1B[49m",St.color.ansi=sD(),St.color.ansi256=oD(),St.color.ansi16m=aD(),St.bgColor.ansi=sD(10),St.bgColor.ansi256=oD(10),St.bgColor.ansi16m=aD(10),Object.defineProperties(St,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(u=>u+u).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>St.rgbToAnsi256(...St.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,i;if(t>=232)n=((t-232)*10+8)/255,r=n,i=n;else{t-=16;let o=t%36;n=Math.floor(t/36)/5,r=Math.floor(o/6)/5,i=o%6/5}let u=Math.max(n,r,i)*2;if(u===0)return 30;let s=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(n));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>St.ansi256ToAnsi(St.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>St.ansi256ToAnsi(St.hexToAnsi256(t)),enumerable:!1}}),St}var RS=NS(),wr=RS;import Kh from"node:process";import LS from"node:os";import lD from"node:tty";function mr(e,t=globalThis.Deno?globalThis.Deno.args:Kh.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:Nt}=Kh,hc;mr("no-color")||mr("no-colors")||mr("color=false")||mr("color=never")?hc=0:(mr("color")||mr("colors")||mr("color=true")||mr("color=always"))&&(hc=1);function PS(){if("FORCE_COLOR"in Nt)return Nt.FORCE_COLOR==="true"?1:Nt.FORCE_COLOR==="false"?0:Nt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Nt.FORCE_COLOR,10),3)}function MS(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function US(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=PS();r!==void 0&&(hc=r);let i=n?hc:r;if(i===0)return 0;if(n){if(mr("color=16m")||mr("color=full")||mr("color=truecolor"))return 3;if(mr("color=256"))return 2}if("TF_BUILD"in Nt&&"AGENT_NAME"in Nt)return 1;if(e&&!t&&i===void 0)return 0;let u=i||0;if(Nt.TERM==="dumb")return u;if(Kh.platform==="win32"){let s=LS.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in Nt)return"GITHUB_ACTIONS"in Nt||"GITEA_ACTIONS"in Nt?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in Nt)||Nt.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in Nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Nt.TEAMCITY_VERSION)?1:0;if(Nt.COLORTERM==="truecolor"||Nt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Nt){let s=Number.parseInt((Nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Nt.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Nt.TERM)||"COLORTERM"in Nt?1:u}function cD(e,t={}){let n=US(e,{streamIsTTY:e&&e.isTTY,...t});return MS(n)}var HS={stdout:cD({isTTY:lD.isatty(1)}),stderr:cD({isTTY:lD.isatty(2)})},fD=HS;function dD(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,u=0,s="";do s+=e.slice(u,r)+t+n,u=r+i,r=e.indexOf(t,u);while(r!==-1);return s+=e.slice(u),s}function hD(e,t,n,r){let i=0,u="";do{let s=e[r-1]==="\r";u+=e.slice(i,s?r-1:r)+t+(s?`\r
3
3
  `:`
4
4
  `)+n,i=r+1,r=e.indexOf(`
5
5
  `,i)}while(r!==-1);return u+=e.slice(i),u}var{stdout:pD,stderr:mD}=fD,Zh=Symbol("GENERATOR"),zs=Symbol("STYLER"),ha=Symbol("IS_EMPTY"),gD=["ansi","ansi","ansi256","ansi16m"],$s=Object.create(null),jS=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=pD?pD.level:0;e.level=t.level===void 0?n:t.level};var GS=e=>{let t=(...n)=>n.join(" ");return jS(t,e),Object.setPrototypeOf(t,pa.prototype),t};function pa(e){return GS(e)}Object.setPrototypeOf(pa.prototype,Function.prototype);for(let[e,t]of Object.entries(wr))$s[e]={get(){let n=pc(this,Xh(t.open,t.close,this[zs]),this[ha]);return Object.defineProperty(this,e,{value:n}),n}};$s.visible={get(){let e=pc(this,this[zs],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Qh=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?wr[n].ansi16m(...r):t==="ansi256"?wr[n].ansi256(wr.rgbToAnsi256(...r)):wr[n].ansi(wr.rgbToAnsi(...r)):e==="hex"?Qh("rgb",t,n,...wr.hexToRgb(...r)):wr[n][e](...r),qS=["rgb","hex","ansi256"];for(let e of qS){$s[e]={get(){let{level:n}=this;return function(...r){let i=Xh(Qh(e,gD[n],"color",...r),wr.color.close,this[zs]);return pc(this,i,this[ha])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);$s[t]={get(){let{level:n}=this;return function(...r){let i=Xh(Qh(e,gD[n],"bgColor",...r),wr.bgColor.close,this[zs]);return pc(this,i,this[ha])}}}}var zS=Object.defineProperties(()=>{},{...$s,level:{enumerable:!0,get(){return this[Zh].level},set(e){this[Zh].level=e}}}),Xh=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},pc=(e,t,n)=>{let r=(...i)=>$S(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,zS),r[Zh]=e,r[zs]=t,r[ha]=n,r},$S=(e,t)=>{if(e.level<=0||!t)return e[ha]?"":t;let n=e[zs];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=dD(t,n.close,n.open),n=n.parent;let u=t.indexOf(`
@@ -104,7 +104,7 @@ ${JSON.stringify(e,void 0,2)}`)}var af;async function ni(){return af===void 0&&(
104
104
  `)}function w5(e){return e==null?"":String(e)}function N5(e){return e.length}function RT(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function w0(){return{enter:{table:R5,tableData:PT,tableHeader:PT,tableRow:P5},exit:{codeText:M5,table:L5,tableData:B0,tableHeader:B0,tableRow:B0}}}function R5(e){let t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function L5(e){this.exit(e),this.data.inTable=void 0}function P5(e){this.enter({type:"tableRow",children:[]},e)}function B0(e){this.exit(e)}function PT(e){this.enter({type:"tableCell",children:[]},e)}function M5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,U5));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function U5(e,t){return t==="|"?t:e}function N0(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
105
105
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:a,tableRow:o}};function s(h,m,A,g){return l(c(h,A,g),h.align)}function o(h,m,A,g){let E=f(h,A,g),_=l([E]);return _.slice(0,_.indexOf(`
106
106
  `))}function a(h,m,A,g){let E=A.enter("tableCell"),_=A.enter("phrasing"),x=A.containerPhrasing(h,{...g,before:u,after:u});return _(),E(),x}function l(h,m){return LT(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(h,m,A){let g=h.children,E=-1,_=[],x=m.enter("table");for(;++E<g.length;)_[E]=f(g[E],m,A);return x(),_}function f(h,m,A){let g=h.children,E=-1,_=[],x=m.enter("tableRow");for(;++E<g.length;)_[E]=a(g[E],h,m,A);return x(),_}function d(h,m,A){let g=fs.inlineCode(h,m,A);return A.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function R0(){return{exit:{taskListCheckValueChecked:MT,taskListCheckValueUnchecked:MT,paragraph:H5}}}function L0(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:j5}}}function MT(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function H5(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let i=t.children,u=-1,s;for(;++u<i.length;){let o=i[u];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function j5(e,t,n,r){let i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);u&&o.move(s);let a=fs.listItem(e,t,n,{...r,...o.current()});return u&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),a;function l(c){return c+s}}function P0(){return[F0(),S0(),v0(),w0(),R0()]}function M0(e){return{extensions:[k0(),I0(),O0(),N0(e),L0()]}}var G5={tokenize:W5,partial:!0},UT={tokenize:Y5,partial:!0},HT={tokenize:K5,partial:!0},jT={tokenize:Z5,partial:!0},q5={tokenize:Q5,partial:!0},GT={tokenize:$5,previous:zT},qT={tokenize:V5,previous:$T},vi={tokenize:z5,previous:VT},si={};function H0(){return{text:si}}var ps=48;for(;ps<123;)si[ps]=vi,ps++,ps===58?ps=65:ps===91&&(ps=97);si[43]=vi;si[45]=vi;si[46]=vi;si[95]=vi;si[72]=[vi,qT];si[104]=[vi,qT];si[87]=[vi,GT];si[119]=[vi,GT];function z5(e,t,n){let r=this,i,u;return s;function s(f){return!U0(f)||!VT.call(r,r.previous)||j0(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return U0(f)?(e.consume(f),o):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(q5,c,l)(f):f===45||f===95||ln(f)?(u=!0,e.consume(f),a):c(f)}function l(f){return e.consume(f),i=!0,a}function c(f){return u&&i&&an(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function $5(e,t,n){let r=this;return i;function i(s){return s!==87&&s!==119||!zT.call(r,r.previous)||j0(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(G5,e.attempt(UT,e.attempt(HT,u),n),n)(s))}function u(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function V5(e,t,n){let r=this,i="",u=!1;return s;function s(f){return(f===72||f===104)&&$T.call(r,r.previous)&&!j0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(an(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){let d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),u?l:(u=!0,a)):n(f)}function l(f){return f===null||us(f)||Qe(f)||ri(f)||ss(f)?n(f):e.attempt(UT,e.attempt(HT,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function W5(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),u):n(s)}function u(s){return s===null?n(s):t(s)}}function Y5(e,t,n){let r,i,u;return s;function s(l){return l===46||l===95?e.check(jT,a,o)(l):l===null||Qe(l)||ri(l)||l!==45&&ss(l)?a(l):(u=!0,e.consume(l),s)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function a(l){return i||r||!u?n(l):t(l)}}function K5(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?u(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(jT,t,u)(s):s===null||Qe(s)||ri(s)?t(s):(e.consume(s),i)}function u(s){return s===41&&r++,e.consume(s),i}}function Z5(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),u):o===93?(e.consume(o),i):o===60||o===null||Qe(o)||ri(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Qe(o)||ri(o)?t(o):r(o)}function u(o){return an(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):an(o)?(e.consume(o),s):n(o)}}function Q5(e,t,n){return r;function r(u){return e.consume(u),i}function i(u){return ln(u)?n(u):t(u)}}function zT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qe(e)}function $T(e){return!an(e)}function VT(e){return!(e===47||U0(e))}function U0(e){return e===43||e===45||e===46||e===95||ln(e)}function j0(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var X5={tokenize:uM,partial:!0};function G0(){return{document:{91:{tokenize:nM,continuation:{tokenize:rM},exit:iM}},text:{91:{tokenize:tM},93:{add:"after",tokenize:J5,resolveTo:eM}}}}function J5(e,t,n){let r=this,i=r.events.length,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;i--;){let a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return o;function o(a){if(!s||!s._balanced)return n(a);let l=Sn(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!u.includes(l.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function eM(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",u,t],["exit",u,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...a),e}function tM(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),u=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(u>999||f===93&&!s||f===null||f===91||Qe(f))return n(f);if(f===93){e.exit("chunkString");let d=e.exit("gfmFootnoteCallString");return i.includes(Sn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Qe(f)||(s=!0),u++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),u++,l):l(f)}}function nM(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),u,s=0,o;return a;function a(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!o||m===null||m===91||Qe(m))return n(m);if(m===93){e.exit("chunkString");let A=e.exit("gfmFootnoteDefinitionLabelString");return u=Sn(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Qe(m)||(o=!0),s++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),s++,c):c(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),Fe(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function rM(e,t,n){return e.check(ii,t,e.attempt(X5,t,n))}function iM(e){e.exit("gfmFootnoteDefinition")}function uM(e,t,n){let r=this;return Fe(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(u):n(u)}}function q0(e){let n=(e||{}).singleTilde,r={tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let l=a;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[a][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[a][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[a][1].start)},d=[["enter",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&Xt(d,d.length,0,nu(h,s.slice(l+1,a),o)),Xt(d,d.length,0,[["exit",f,o],["enter",s[a][1],o],["exit",s[a][1],o],["exit",c,o]]),Xt(s,l-1,a-l+3,d),a=l+d.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function u(s,o,a){let l=this.previous,c=this.events,f=0;return d;function d(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?a(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){let A=Eo(l);if(m===126)return f>1?a(m):(s.consume(m),f++,h);if(f<2&&!n)return a(m);let g=s.exit("strikethroughSequenceTemporary"),E=Eo(m);return g._open=!E||E===2&&!!A,g._close=!A||A===2&&!!E,o(m)}}}var Nf=class{constructor(){this.map=[]}add(t,n,r){sM(this,t,n,r)}consume(t){if(this.map.sort(function(u,s){return u[0]-s[0]}),this.map.length===0)return;let n=this.map.length,r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}};function sM(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function WT(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function z0(){return{flow:{null:{tokenize:oM,resolveAll:aM}}}}function oM(e,t,n){let r=this,i=0,u=0,s;return o;function o(T){let G=r.events.length-1;for(;G>-1;){let q=r.events[G][1].type;if(q==="lineEnding"||q==="linePrefix")G--;else break}let R=G>-1?r.events[G][1].type:null,N=R==="tableHead"||R==="tableRow"?b:a;return N===b&&r.parser.lazy[r.now().line]?n(T):N(T)}function a(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(s=!0,u+=1),c(T)}function c(T){return T===null?n(T):ue(T)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),h):n(T):ve(T)?Fe(e,c,"whitespace")(T):(u+=1,s&&(s=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||Qe(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?d:f)}function d(T){return T===92||T===124?(e.consume(T),f):f(T)}function h(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),s=!1,ve(T)?Fe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?g(T):T===124?(s=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),A):O(T)}function A(T){return ve(T)?Fe(e,g,"whitespace")(T):g(T)}function g(T){return T===58?(u+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),E):T===45?(u+=1,E(T)):T===null||ue(T)?v(T):O(T)}function E(T){return T===45?(e.enter("tableDelimiterFiller"),_(T)):O(T)}function _(T){return T===45?(e.consume(T),_):T===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(T))}function x(T){return ve(T)?Fe(e,v,"whitespace")(T):v(T)}function v(T){return T===124?m(T):T===null||ue(T)?!s||i!==u?O(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):O(T)}function O(T){return n(T)}function b(T){return e.enter("tableRow"),B(T)}function B(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),B):T===null||ue(T)?(e.exit("tableRow"),t(T)):ve(T)?Fe(e,B,"whitespace")(T):(e.enter("data"),L(T))}function L(T){return T===null||T===124||Qe(T)?(e.exit("data"),B(T)):(e.consume(T),T===92?P:L)}function P(T){return T===92||T===124?(e.consume(T),L):L(T)}}function aM(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],s=[0,0,0,0],o=!1,a=0,l,c,f,d=new Nf;for(;++n<e.length;){let h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,a!==0&&(YT(d,t,a,l,c),c=void 0,a=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,u=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(u[1]!==0&&(s[0]=s[1],f=Rf(d,t,u,i,void 0,f),u=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(s[0]=s[1],f=Rf(d,t,u,i,void 0,f)),u=s,s=[u[1],n,0,0])):m.type==="tableHead"?(o=!0,a=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(a=n,u[1]!==0?(s[0]=s[1],f=Rf(d,t,u,i,n,f)):s[1]!==0&&(f=Rf(d,t,s,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&YT(d,t,a,l,c),d.consume(t.events),n=-1;++n<t.events.length;){let h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=WT(t.events,n))}return e}function Rf(e,t,n,r,i,u){let s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(u.end=Object.assign({},To(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));let a=To(t.events,n[1]);if(u={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){let l=To(t.events,n[2]),c=To(t.events,n[3]),f={type:o,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){let d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){let m=n[2]+1,A=n[3]-n[2]-1;e.add(m,A,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(u.end=Object.assign({},To(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function YT(e,t,n,r,i){let u=[],s=To(t.events,n);i&&(i.end=Object.assign({},s),u.push(["exit",i,t])),r.end=Object.assign({},s),u.push(["exit",r,t]),e.add(n+1,0,u)}function To(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var lM={tokenize:cM};function $0(){return{text:{91:lM}}}function cM(e,t,n){let r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),u)}function u(a){return Qe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(a)}function o(a){return ue(a)?t(a):ve(a)?e.check({tokenize:fM},t,n)(a):n(a)}}function fM(e,t,n){return Fe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function KT(e){return lf([H0(),G0(),q0(e),z0(),$0()])}var dM={};function uu(e){let t=this,n=e||dM,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(KT(n)),u.push(P0()),s.push(M0(n))}import ZT from"node:fs";import QT from"node:path";function V0(e,t,n){let r=W0(e);if(!n&&typeof t=="function"&&(n=t,t=void 0),!n)return new Promise(u);u(i,n);function i(s){n(void 0,s)}function u(s,o){let a;try{a=QT.resolve(r.cwd,r.path)}catch(c){return o(c)}ZT.readFile(a,t,l);function l(c,f){c?o(c):(r.value=f,s(r))}}}function W0(e){return typeof e=="string"||e instanceof URL?e={path:e}:pM(e)&&(e={path:new TextDecoder().decode(e)}),hM(e)?e:new hs(e)}function su(e,t,n){let r=W0(e);if(!n&&typeof t=="function"&&(n=t,t=void 0),!n)return new Promise(u);u(i,n);function i(s){n(void 0,s)}function u(s,o){let a;try{a=QT.resolve(r.cwd,r.path)}catch(c){return o(c)}ZT.writeFile(a,r.value||"",t||void 0,l);function l(c){c?o(c):s(r)}}}function hM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}async function ou(e,t,n,r,i,u,s){let o=await t({additionalConfig:u,additionalRules:s});u=o;let a=dc(e),l=uD(a,i,r,"md"),c=[],f=n(o);for(let{input:d,name:h,output:m}of l){let A=await V0(d),g=await f.process(A);g.dirname=m,g.basename=h,c.push(g)}return c}function Lf(e){return Co().use({settings:{bullet:"-",emphasis:"_"}}).use(uu).use(()=>async function(n,r){Fm(n,r),lm(n,r,e),await JA(n,r,e)})}function Pf(e){return Co().use({settings:{bullet:"-",emphasis:"_"}}).use(uu).use(()=>function(n,r){Fm(n,r),lm(n,r,e)})}function Mf(e){return Co().use({settings:{bullet:"-",emphasis:"_"}}).use(uu).use(()=>async function(n,r){await cA(n,r,{...e,paranoid:!1})})}async function XT(e,t,n,r,i){return ou(e,is,Lf,t,n,r,i)}async function JT(e,t,n,r,i){return ou(e,is,Mf,t,n,r,i)}async function ex(e,t,n,r,i){return ou(e,is,Pf,t,n,r,i)}var Uf={badges:{async content(e){let t=qe.object({custom:qe.record(qe.object({image:qe.string(),link:qe.string()})).optional(),npm:qe.array(qe.string()).optional()}).optional().parse(e),n=await lr(),{name:r}=n,i=[];if(!n.private&&n.publishConfig?.access==="public"&&i.push(`[![NPM Package ${r}](https://img.shields.io/npm/v/${r}.svg)](https://npmjs.com/package/${r})`),t?.npm!==void 0)for(let s of t.npm)i.push(`[![NPM Package ${s}](https://img.shields.io/npm/v/${s}.svg)](https://npmjs.com/package/${s})`);let{license:u}=n;if(u!==void 0&&i.push(`[![License: ${u}](https://img.shields.io/badge/License-${u}-yellow.svg)](https://opensource.org/licenses/${u})`),t?.custom!==void 0)for(let[s,{image:o,link:a}]of Object.entries(t.custom))i.push(`[![${s}](${o})](${a})`);return i.join(`
107
- `)},order:3}};import{globby as gM}from"globby";import Hf from"node:path";import{readPackage as EM}from"read-pkg";var jf={banner:{async content(e){let t=qe.object({alt:qe.string().optional(),src:qe.string().optional()}).optional().parse(e),{assetsPath:n,packageFile:r}=await ni();if(r===void 0)throw new Error("No package.json found");let i=t?.src??await tx(n)??await tx();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!nx(i)&&!await qs(i))throw new Error(`Banner image not found at "${i}"`);let u=t?.alt??`${(await EM({cwd:Hf.dirname(r)})).name} banner`;if(u===void 0||u==="undefined banner")throw new Error("Banner image alt text not available");return`![${u}](${i})`},order:2}};async function tx(e){let{packageFile:t}=await ni();if(t===void 0)throw new Error("No package.json found");let n=Hf.dirname(t),r=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],u=["png","gif","jpg","jpeg","svg","webp"],s=await gM(r.map(o=>Hf.join(n,o)),{deep:1,expandDirectories:{extensions:u,files:i}});if(s.length>0)return Hf.relative(process.cwd(),s[0])}function nx(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?nx(`https://${e}`,!1):!1}}function rx(e,t=Number.MAX_SAFE_INTEGER){let n=[],r=DM(e,t);return n.push(AM(r)),n.push(CM(e,r)),r.hasMultipleSubcommands&&r.canRecurse&&n.push(TM(r.fullCommandName)),r.defaultCommand?.commandName!==void 0&&n.push(xM(r)),n.push(yM(e,r)),e.positionals&&!r.commandsOnly&&n.push(Y0(["Positional Argument","Description","Type","Default"],e.positionals.map(i=>[i.arguments?[i.arguments.map(u=>`\`${u}\``)].join(" "):"",`${i.description??""}${i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),e.commands&&n.push(Y0(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments?.map(u=>`\`${u}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!r.commandsOnly&&n.push(Y0(["Option","Alias","Argument","Description","Type","Default"],e.options.map(i=>[i.flags?i.flags.map(u=>`\`${u}\``).join(" "):"",i.aliases?i.aliases.map(u=>`\`${u}\``).join(" "):"",i.arguments?i.arguments.map(u=>`\`${u}\``).join(" "):"",i.description??"",i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),r.canRecurse&&r.hasMultipleSubcommands&&n.push("_See the sections below for more information on each subcommand._"),n.join(`
107
+ `)},order:3}};import{globby as gM}from"globby";import Hf from"node:path";import{readPackage as EM}from"read-pkg";var jf={banner:{async content(e){let t=qe.object({alt:qe.string().optional(),src:qe.string().optional()}).optional().parse(e),{assetsPath:n,packageFile:r}=await ni();if(r===void 0)throw new Error("No package.json found");let i=t?.src??await tx(n)??await tx();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!nx(i)&&!await qs(i))throw new Error(`Banner image not found at "${i}"`);let u=t?.alt??`${(await EM({cwd:Hf.dirname(r)})).name} banner`;if(u===void 0||u==="undefined banner")throw new Error("Banner image alt text not available");return`![${u}](${i})`},order:2}};async function tx(e){let{packageFile:t}=await ni();if(t===void 0)throw new Error("No package.json found");let n=Hf.dirname(t),r=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],u=["png","gif","jpg","jpeg","svg","webp"],s=await gM(r.map(o=>Hf.join(n,o)),{deep:1,expandDirectories:{extensions:u,files:i}});if(s.length>0)return Hf.relative(process.cwd(),s[0])}function nx(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?nx(`https://${e}`,!1):!1}}function rx(e,t=Number.MAX_SAFE_INTEGER){let n=[],r=DM(e,t);return n.push(AM(r)),n.push(CM(e,r)),r.hasMultipleSubcommands&&r.canRecurse&&n.push(TM(r.fullCommandName)),r.defaultCommand?.commandName!==void 0&&n.push(xM(r)),n.push(yM(e,r)),e.positionals&&!r.commandsOnly&&n.push(Y0(["Positional Argument","Description","Type","Default"],e.positionals.map(i=>[i.arguments?[i.arguments.map(u=>`\`${u}\``)].join(" "):"",`${i.description??""}${i.required===void 0?"":i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),e.commands&&n.push(Y0(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments?.map(u=>`\`${u}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!r.commandsOnly&&n.push(Y0(["Option","Argument","Description","Type","Default"],e.options.map(i=>[i.flags!==void 0||i.aliases!==void 0?[...i.flags??[],...i.aliases??[]].map(u=>`\`${u}\``).join("<br>"):"",i.arguments?i.arguments.map(u=>`\`${u}\``).join(" "):"",i.description??"",i.choices?i.choices.map(u=>`\`${u}\``).join(" "):i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")&&i.choices===void 0?i.defaultValue:`\`${i.defaultValue}\``:""]))),r.canRecurse&&r.hasMultipleSubcommands&&n.push("_See the sections below for more information on each subcommand._"),n.join(`
108
108
 
109
109
  `)}function DM(e,t){let n=e.subcommandName===void 0,r=e.commands?e.commands.length>1:!1,i=t>1,u=e.commands?.find(l=>l.default),s=e.commands?.find(l=>l.commandName===void 0),o=`${e.commandName}${e.subcommandName?` ${e.subcommandName}`:""}`,a=i&&r&&u?.commandName!==void 0;return{canRecurse:i,commandsOnly:a,defaultCommand:u,fullCommandName:o,hasMultipleSubcommands:r,isTopLevel:n,topLevelCommand:s}}function AM(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function CM(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(n=>n!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function TM(e){return`This section lists top-level commands for \`${e}\`.`}function xM(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function yM(e,t){let n=t.topLevelCommand?.arguments?` ${t.topLevelCommand.arguments.join(" ")}`:`${e.arguments?` ${e.arguments.join(" ")}`:""}`;return`Usage:
110
110
 
@@ -220,7 +220,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
220
220
  `)}`)})}constructor(t,n){this.definitionErrors=[],this.selfAnalysisDone=!1;let r=this;if(r.initErrorHandler(n),r.initLexerAdapter(),r.initLooksAhead(n),r.initRecognizerEngine(t,n),r.initRecoverable(n),r.initTreeBuilder(n),r.initContentAssist(),r.initGastRecorder(n),r.initPerformanceTracer(n),me(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
221
221
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
222
222
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
223
- For further details.`);this.skipValidations=me(n,"skipValidations")?n.skipValidations:qn.skipValidations}};jl.DEFER_DEFINITION_ERRORS_HANDLING=!1;iF(jl,[Ld,Ud,qd,zd,Vd,$d,Wd,Yd,Kd,Xd]);var _s=class extends jl{constructor(t,n=qn){let r=Ct(n);r.outputCst=!0,super(t,r)}};var eh=je({name:"flag",pattern:/--[\w-_]+/}),Lg=je({longer_alt:eh,name:"alias",pattern:/-[A-Za-z]/}),uF=je({group:tt.SKIPPED,name:"comma",pattern:/,/}),sF=je({group:tt.SKIPPED,name:"dollar",pattern:/\$/}),Jd=je({group:tt.SKIPPED,name:"whiteSpace",pattern:/ /}),oF=je({group:tt.SKIPPED,name:"newLine",pattern:/\n/}),Pg=je({name:"word",pattern:/\S+/}),ql=je({name:"argument",pattern:/(<\S+>|\[.+])/}),Mg=je({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),aF=je({group:tt.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),lF=je({group:tt.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Ug=je({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Hg=je({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),jg=je({name:"rowDescription",pattern:/\w.+/}),cF=je({group:tt.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),fF=je({group:tt.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),sV=new tt({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[aF,Ug,Mg,oF,Jd],OPTIONS_MODE:[fF,Hg],ROW_MODE:[cF,Lg,eh,uF,ql,jg,Jd],USAGE_MODE:[lF,sF,ql,Pg,Jd]}}),oV=[eh,Lg,uF,sF,Jd,oF,Pg,ql,Mg,aF,lF,Ug,Hg,jg,cF,fF],Ng=class extends _s{programHelp=this.RULE("programHelp",()=>{this.CONSUME(Mg,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Pg,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(ql)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Ug),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Hg),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(ql)},{ALT:()=>this.CONSUME(Lg)},{ALT:()=>this.CONSUME(eh)},{ALT:()=>this.CONSUME(jg,{LABEL:"description"})}])})});constructor(){super(oV),this.performSelfAnalysis()}},Gl=new Ng,Rg=class extends Gl.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:n,subcommand:r}=th(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:n,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:r}}optionsSection(t){return t.sectionRow.map(n=>this.visit(n))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}getString(t,n=!1){if(t!==void 0)return t.map(r=>n?this.clean(r.image):r.image).join(" ")}getArray(t){if(t!==void 0)return t.map(n=>n.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}},aV=new Rg;function dF(e){let t=sV.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Gl.input=t.tokens;let n=Gl.programHelp();if(Gl.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Gl.errors,void 0,2)}`);let r;try{r=aV.visit(n)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(r===void 0)throw new Error("Could not parse help string");return r}var $g=je({name:"flag",pattern:/--[\w-_]+/}),Vg=je({name:"alias",pattern:/-[A-Za-z]/}),hF=je({group:tt.SKIPPED,name:"comma",pattern:/,/}),na=je({name:"word",pattern:/\S+/}),$l=je({name:"argument",pattern:/<\S+>|\[\S+]/}),Wg=je({name:"type",pattern:/\[(boolean|string|array)]/}),Yg=je({name:"defaultInfo",pattern:/\[default]/}),Kg=je({name:"required",pattern:/\[required]/}),Zg=je({name:"defaultInfoDescription",pattern:/\[default:\s.+?]/}),Qg=je({name:"choices",pattern:/\[choices:\s.+?]/}),Gg=je({group:tt.SKIPPED,name:"whiteSpace",pattern:/\s/}),pF=je({group:tt.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),Xg=je({name:"programDescription",pattern:/.+/}),mF=je({group:tt.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),Jg=je({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),eE=je({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),tE=je({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),nE=je({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),rE=je({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),iE=je({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),gF=je({group:tt.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),EF=je({group:tt.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),lV=new tt({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Jg,eE,tE,pF,$l,na,Gg],PROGRAM_DESCRIPTION_MODE:[mF,Xg],ROW_MODE:[gF,hF,Wg,rE,iE,Zg,Yg,Kg,Qg,$g,Vg,$l,na,Gg],SECTION_MODE:[nE,EF]}}),cV=[$g,Vg,hF,na,$l,Wg,Yg,Kg,Zg,Qg,Gg,pF,Xg,mF,Jg,eE,tE,nE,rE,iE,gF,EF],qg=class extends _s{programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(na,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME($l)}),this.OPTION(()=>{this.CONSUME(Xg,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(eE),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(tE),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Jg),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(nE),this.OPTION(()=>{this.CONSUME(na,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(na,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME($l)},{ALT:()=>this.CONSUME(Vg)},{ALT:()=>this.CONSUME($g)},{ALT:()=>this.CONSUME(rE,{LABEL:"description"})},{ALT:()=>this.CONSUME(iE,{LABEL:"description"})},{ALT:()=>this.CONSUME(Wg)},{ALT:()=>this.CONSUME(Kg)},{ALT:()=>this.CONSUME(Zg)},{ALT:()=>this.CONSUME(Yg)},{ALT:()=>this.CONSUME(Qg)}])})});constructor(){super(cV),this.performSelfAnalysis()}},zl=new qg,zg=class extends zl.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:n,subcommand:r}=th(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:n,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:r}}positionalsSection(t){return t.sectionRow.map(n=>this.positionalParentCommandToArguments(this.visit(n)))}commandsSection(t){return t.sectionRow.map(n=>this.visit(n))}optionsSection(t){return t.sectionRow.map(n=>this.visit(n))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}positionalParentCommandToArguments(t){let{arguments:n,parentCommandName:r,...i}=t;return r===void 0?t:{arguments:[r,...n??[]],...i}}getString(t,n=!1){if(t!==void 0)return t.map(r=>n?this.clean(r.image):r.image).join(" ")}getArray(t){if(t!==void 0)return t.map(n=>n.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},fV=new zg;function DF(e){let t=lV.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);zl.input=t.tokens;let n=zl.programHelp();if(zl.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(zl.errors,void 0,2)}`);let r;try{r=fV.visit(n)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(r===void 0)throw new Error("Could not parse help string");return r}var AF={meow:dF,yargs:DF};function th(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0&&e===void 0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let n=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:n}}function CF(e){for(let[t,n]of Object.entries(AF)){Se.info(`Trying to parse help string with ${t} parser...`);try{return n(e)}catch(r){r instanceof Error&&Se.info(`Error in "${t}" parser: ${String(r)}`);continue}}Se.error("Could not parse help string with any parser")}import{execaCommand as dV}from"execa";async function uE(e,t="--help",n){let r=`${e} ${t}`,i=await mV(r),u=CF(i);return u===void 0?(Se.warn("Falling back to basic cli help text output."),pV(i)):hV(e,t,n??Number.MAX_SAFE_INTEGER,u)}async function hV(e,t,n,r){if(n<=0)return Se.info("Max CLI command help depth reached, stopping recursion"),"";let i=rx(r,n),u=e.split(" ")[0];if(r.commands)for(let s of r.commands){if(!s.parentCommandName||!s.commandName)continue;let o=await uE(`${u} ${s.commandName}`,t,n-1);if(o==="")return i;i+=`
223
+ For further details.`);this.skipValidations=me(n,"skipValidations")?n.skipValidations:qn.skipValidations}};jl.DEFER_DEFINITION_ERRORS_HANDLING=!1;iF(jl,[Ld,Ud,qd,zd,Vd,$d,Wd,Yd,Kd,Xd]);var _s=class extends jl{constructor(t,n=qn){let r=Ct(n);r.outputCst=!0,super(t,r)}};var eh=je({name:"flag",pattern:/--[\w-_]+/}),Lg=je({longer_alt:eh,name:"alias",pattern:/-[A-Za-z]/}),uF=je({group:tt.SKIPPED,name:"comma",pattern:/,/}),sF=je({group:tt.SKIPPED,name:"dollar",pattern:/\$/}),Jd=je({group:tt.SKIPPED,name:"whiteSpace",pattern:/ /}),oF=je({group:tt.SKIPPED,name:"newLine",pattern:/\n/}),Pg=je({name:"word",pattern:/\S+/}),ql=je({name:"argument",pattern:/(<\S+>|\[.+])/}),Mg=je({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),aF=je({group:tt.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),lF=je({group:tt.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Ug=je({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Hg=je({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),jg=je({name:"rowDescription",pattern:/\w.+/}),cF=je({group:tt.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),fF=je({group:tt.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),sV=new tt({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[aF,Ug,Mg,oF,Jd],OPTIONS_MODE:[fF,Hg],ROW_MODE:[cF,Lg,eh,uF,ql,jg,Jd],USAGE_MODE:[lF,sF,ql,Pg,Jd]}}),oV=[eh,Lg,uF,sF,Jd,oF,Pg,ql,Mg,aF,lF,Ug,Hg,jg,cF,fF],Ng=class extends _s{programHelp=this.RULE("programHelp",()=>{this.CONSUME(Mg,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Pg,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(ql)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Ug),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Hg),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(ql)},{ALT:()=>this.CONSUME(Lg)},{ALT:()=>this.CONSUME(eh)},{ALT:()=>this.CONSUME(jg,{LABEL:"description"})}])})});constructor(){super(oV),this.performSelfAnalysis()}},Gl=new Ng,Rg=class extends Gl.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:n,subcommand:r}=th(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:n,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:r}}optionsSection(t){return t.sectionRow.map(n=>this.visit(n))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}getString(t,n=!1){if(t!==void 0)return t.map(r=>n?this.clean(r.image):r.image).join(" ")}getArray(t){if(t!==void 0)return t.map(n=>n.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}},aV=new Rg;function dF(e){let t=sV.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Gl.input=t.tokens;let n=Gl.programHelp();if(Gl.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Gl.errors,void 0,2)}`);let r;try{r=aV.visit(n)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(r===void 0)throw new Error("Could not parse help string");return r}var $g=je({name:"flag",pattern:/--[\w-_]+/}),Vg=je({name:"alias",pattern:/-[A-Za-z]/}),hF=je({group:tt.SKIPPED,name:"comma",pattern:/,/}),na=je({name:"word",pattern:/\S+/}),$l=je({name:"argument",pattern:/<\S+>|\[\S+]/}),Wg=je({name:"type",pattern:/\[(boolean|string|array|number)]/}),Yg=je({name:"defaultInfo",pattern:/\[default]/}),Kg=je({name:"required",pattern:/\[required]/}),Zg=je({name:"defaultInfoDescription",pattern:/\[default:\s.+?]/}),Qg=je({name:"choices",pattern:/\[choices:\s.+?]/}),Gg=je({group:tt.SKIPPED,name:"whiteSpace",pattern:/\s/}),pF=je({group:tt.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),Xg=je({name:"programDescription",pattern:/.+/}),mF=je({group:tt.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),Jg=je({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),eE=je({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),tE=je({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),nE=je({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),rE=je({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),iE=je({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),gF=je({group:tt.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),EF=je({group:tt.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),lV=new tt({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Jg,eE,tE,pF,$l,na,Gg],PROGRAM_DESCRIPTION_MODE:[mF,Xg],ROW_MODE:[gF,hF,Wg,rE,iE,Zg,Yg,Kg,Qg,$g,Vg,$l,na,Gg],SECTION_MODE:[nE,EF]}}),cV=[$g,Vg,hF,na,$l,Wg,Yg,Kg,Zg,Qg,Gg,pF,Xg,mF,Jg,eE,tE,nE,rE,iE,gF,EF],qg=class extends _s{programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(na,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME($l)}),this.OPTION(()=>{this.CONSUME(Xg,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(eE),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(tE),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Jg),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(nE),this.OPTION(()=>{this.CONSUME(na,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(na,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME($l)},{ALT:()=>this.CONSUME(Vg)},{ALT:()=>this.CONSUME($g)},{ALT:()=>this.CONSUME(rE,{LABEL:"description"})},{ALT:()=>this.CONSUME(iE,{LABEL:"description"})},{ALT:()=>this.CONSUME(Wg)},{ALT:()=>this.CONSUME(Kg)},{ALT:()=>this.CONSUME(Zg)},{ALT:()=>this.CONSUME(Yg)},{ALT:()=>this.CONSUME(Qg)}])})});constructor(){super(cV),this.performSelfAnalysis()}},zl=new qg,zg=class extends zl.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:n,subcommand:r}=th(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:n,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:r}}positionalsSection(t){return t.sectionRow.map(n=>this.positionalParentCommandToArguments(this.visit(n)))}commandsSection(t){return t.sectionRow.map(n=>this.visit(n))}optionsSection(t){return t.sectionRow.map(n=>this.visit(n))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}positionalParentCommandToArguments(t){let{arguments:n,parentCommandName:r,...i}=t;return r===void 0?t:{arguments:[r,...n??[]],...i}}getString(t,n=!1){if(t!==void 0)return t.map(r=>n?this.clean(r.image):r.image).join(" ")}getArray(t){if(t!==void 0)return t.map(n=>n.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},fV=new zg;function DF(e){let t=lV.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);zl.input=t.tokens;let n=zl.programHelp();if(zl.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(zl.errors,void 0,2)}`);let r;try{r=fV.visit(n)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(r===void 0)throw new Error("Could not parse help string");return r}var AF={meow:dF,yargs:DF};function th(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0&&e===void 0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let n=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:n}}function CF(e){for(let[t,n]of Object.entries(AF)){Se.info(`Trying to parse help string with ${t} parser...`);try{return n(e)}catch(r){r instanceof Error&&Se.info(`Error in "${t}" parser: ${String(r)}`);continue}}Se.error("Could not parse help string with any parser")}import{execaCommand as dV}from"execa";async function uE(e,t="--help",n){let r=`${e} ${t}`,i=await mV(r),u=CF(i);return u===void 0?(Se.warn("Falling back to basic cli help text output."),pV(i)):hV(e,t,n??Number.MAX_SAFE_INTEGER,u)}async function hV(e,t,n,r){if(n<=0)return Se.info("Max CLI command help depth reached, stopping recursion"),"";let i=rx(r,n),u=e.split(" ")[0];if(r.commands)for(let s of r.commands){if(!s.parentCommandName||!s.commandName)continue;let o=await uE(`${u} ${s.commandName}`,t,n-1);if(o==="")return i;i+=`
224
224
 
225
225
  ${o}`}return i}function pV(e){return`\`\`\`txt
226
226
  ${e}
@@ -279,7 +279,7 @@ ${r}
279
279
 
280
280
  _List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._
281
281
 
282
- ## Acknowledgements
282
+ ## Acknowledgments
283
283
 
284
284
  _State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
285
285
 
@@ -330,7 +330,7 @@ _State anyone or anything that significantly helped with the development of your
330
330
 
331
331
  _List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email)._
332
332
 
333
- ## Acknowledgements
333
+ ## Acknowledgments
334
334
 
335
335
  _State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
336
336
 
package/dist/index.js CHANGED
@@ -103,7 +103,7 @@ ${JSON.stringify(e,void 0,2)}`)}var jl;async function mu(){return jl===void 0&&(
103
103
  `)}function ML(e){return e==null?"":String(e)}function UL(e){return e.length}function d2(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Wh(){return{enter:{table:HL,tableData:h2,tableHeader:h2,tableRow:jL},exit:{codeText:qL,table:GL,tableData:$h,tableHeader:$h,tableRow:$h}}}function HL(e){let t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function GL(e){this.exit(e),this.data.inTable=void 0}function jL(e){this.enter({type:"tableRow",children:[]},e)}function $h(e){this.exit(e)}function h2(e){this.enter({type:"tableCell",children:[]},e)}function qL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zL));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function zL(e,t){return t==="|"?t:e}function Yh(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,u=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
104
104
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:s,tableRow:o}};function a(p,m,C,T){return l(c(p,C,T),p.align)}function o(p,m,C,T){let E=f(p,C,T),b=l([E]);return b.slice(0,b.indexOf(`
105
105
  `))}function s(p,m,C,T){let E=C.enter("tableCell"),b=C.enter("phrasing"),y=C.containerPhrasing(p,{...T,before:u,after:u});return b(),E(),y}function l(p,m){return p2(p,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(p,m,C){let T=p.children,E=-1,b=[],y=m.enter("table");for(;++E<T.length;)b[E]=f(T[E],m,C);return y(),b}function f(p,m,C){let T=p.children,E=-1,b=[],y=m.enter("tableRow");for(;++E<T.length;)b[E]=s(T[E],p,m,C);return y(),b}function h(p,m,C){let T=xu.inlineCode(p,m,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function Kh(){return{exit:{taskListCheckValueChecked:m2,taskListCheckValueUnchecked:m2,paragraph:VL}}}function Zh(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$L}}}function m2(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function VL(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=t.children,u=-1,a;for(;++u<i.length;){let o=i[u];if(o.type==="paragraph"){a=o;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $L(e,t,r,n){let i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);u&&o.move(a);let s=xu.listItem(e,t,r,{...n,...o.current()});return u&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),s;function l(c){return c+a}}function Xh(){return[Hh(),jh(),zh(),Wh(),Kh()]}function Qh(e){return{extensions:[Gh(),qh(),Vh(),Yh(e),Zh()]}}var WL={tokenize:QL,partial:!0},E2={tokenize:JL,partial:!0},D2={tokenize:e8,partial:!0},g2={tokenize:t8,partial:!0},YL={tokenize:r8,partial:!0},A2={tokenize:ZL,previous:T2},C2={tokenize:XL,previous:x2},Zn={tokenize:KL,previous:y2},bn={};function em(){return{text:bn}}var _u=48;for(;_u<123;)bn[_u]=Zn,_u++,_u===58?_u=65:_u===91&&(_u=97);bn[43]=Zn;bn[45]=Zn;bn[46]=Zn;bn[95]=Zn;bn[72]=[Zn,C2];bn[104]=[Zn,C2];bn[87]=[Zn,A2];bn[119]=[Zn,A2];function KL(e,t,r){let n=this,i,u;return a;function a(f){return!Jh(f)||!y2.call(n,n.previous)||tm(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Jh(f)?(e.consume(f),o):f===64?(e.consume(f),s):r(f)}function s(f){return f===46?e.check(YL,c,l)(f):f===45||f===95||Ut(f)?(u=!0,e.consume(f),s):c(f)}function l(f){return e.consume(f),i=!0,s}function c(f){return u&&i&&Mt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function ZL(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!T2.call(n,n.previous)||tm(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(WL,e.attempt(E2,e.attempt(D2,u),r),r)(a))}function u(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function XL(e,t,r){let n=this,i="",u=!1;return a;function a(f){return(f===72||f===104)&&x2.call(n,n.previous)&&!tm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):r(f)}function o(f){if(Mt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){let h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(f),s}return r(f)}function s(f){return f===47?(e.consume(f),u?l:(u=!0,s)):r(f)}function l(f){return f===null||Eu(f)||Se(f)||yn(f)||Du(f)?r(f):e.attempt(E2,e.attempt(D2,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function QL(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),u):r(a)}function u(a){return a===null?r(a):t(a)}}function JL(e,t,r){let n,i,u;return a;function a(l){return l===46||l===95?e.check(g2,s,o)(l):l===null||Se(l)||yn(l)||l!==45&&Du(l)?s(l):(u=!0,e.consume(l),a)}function o(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),a}function s(l){return i||n||!u?r(l):t(l)}}function e8(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?u(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(g2,t,u)(a):a===null||Se(a)||yn(a)?t(a):(e.consume(a),i)}function u(a){return a===41&&n++,e.consume(a),i}}function t8(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),u):o===93?(e.consume(o),i):o===60||o===null||Se(o)||yn(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Se(o)||yn(o)?t(o):n(o)}function u(o){return Mt(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),n):Mt(o)?(e.consume(o),a):r(o)}}function r8(e,t,r){return n;function n(u){return e.consume(u),i}function i(u){return Ut(u)?r(u):t(u)}}function T2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Se(e)}function x2(e){return!Mt(e)}function y2(e){return!(e===47||Jh(e))}function Jh(e){return e===43||e===45||e===46||e===95||Ut(e)}function tm(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var n8={tokenize:c8,partial:!0};function rm(){return{document:{91:{tokenize:o8,continuation:{tokenize:s8},exit:l8}},text:{91:{tokenize:a8},93:{add:"after",tokenize:i8,resolveTo:u8}}}}function i8(e,t,r){let n=this,i=n.events.length,u=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let s=n.events[i][1];if(s.type==="labelImage"){a=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return o;function o(s){if(!a||!a._balanced)return r(s);let l=tr(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!u.includes(l.slice(1))?r(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function u8(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",u,t],["exit",u,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...s),e}function a8(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),u=0,a;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),s}function s(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(u>999||f===93&&!a||f===null||f===91||Se(f))return r(f);if(f===93){e.exit("chunkString");let h=e.exit("gfmFootnoteCallString");return i.includes(tr(n.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Se(f)||(a=!0),u++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),u++,l):l(f)}}function o8(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),u,a=0,o;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(m)}function c(m){if(a>999||m===93&&!o||m===null||m===91||Se(m))return r(m);if(m===93){e.exit("chunkString");let C=e.exit("gfmFootnoteDefinitionLabelString");return u=tr(n.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Se(m)||(o=!0),a++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),se(e,p,"gfmFootnoteDefinitionWhitespace")):r(m)}function p(m){return t(m)}}function s8(e,t,r){return e.check(_n,t,e.attempt(n8,t,r))}function l8(e){e.exit("gfmFootnoteDefinition")}function c8(e,t,r){let n=this;return se(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):r(u)}}function nm(e){let r=(e||{}).singleTilde,n={tokenize:u,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,o){let s=-1;for(;++s<a.length;)if(a[s][0]==="enter"&&a[s][1].type==="strikethroughSequenceTemporary"&&a[s][1]._close){let l=s;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[s][1].end.offset-a[s][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[s][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[s][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[s][1].start)},h=[["enter",c,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",f,o]],p=o.parser.constructs.insideSpan.null;p&&Bt(h,h.length,0,Ti(p,a.slice(l+1,s),o)),Bt(h,h.length,0,[["exit",f,o],["enter",a[s][1],o],["exit",a[s][1],o],["exit",c,o]]),Bt(a,l-1,s-l+3,h),s=l+h.length-2;break}}for(s=-1;++s<a.length;)a[s][1].type==="strikethroughSequenceTemporary"&&(a[s][1].type="data");return a}function u(a,o,s){let l=this.previous,c=this.events,f=0;return h;function h(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?s(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){let C=ca(l);if(m===126)return f>1?s(m):(a.consume(m),f++,p);if(f<2&&!r)return s(m);let T=a.exit("strikethroughSequenceTemporary"),E=ca(m);return T._open=!E||E===2&&!!C,T._close=!C||C===2&&!!E,o(m)}}}var hc=class{constructor(){this.map=[]}add(t,r,n){f8(this,t,r,n)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let i=n.pop();for(;i;)t.push(...i),i=n.pop();this.map.length=0}};function f8(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function _2(e,t){let r=!1,n=[];for(;t<e.length;){let i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let u=n.length-1;n[u]=n[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function im(){return{flow:{null:{tokenize:d8,resolveAll:p8}}}}function d8(e,t,r){let n=this,i=0,u=0,a;return o;function o(A){let j=n.events.length-1;for(;j>-1;){let G=n.events[j][1].type;if(G==="lineEnding"||G==="linePrefix")j--;else break}let U=j>-1?n.events[j][1].type:null,L=U==="tableHead"||U==="tableRow"?_:s;return L===_&&n.parser.lazy[n.now().line]?r(A):L(A)}function s(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,u+=1),c(A)}function c(A){return A===null?r(A):K(A)?u>1?(u=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),p):r(A):fe(A)?se(e,c,"whitespace")(A):(u+=1,a&&(a=!1,i+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(A)))}function f(A){return A===null||A===124||Se(A)?(e.exit("data"),c(A)):(e.consume(A),A===92?h:f)}function h(A){return A===92||A===124?(e.consume(A),f):f(A)}function p(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(A):(e.enter("tableDelimiterRow"),a=!1,fe(A)?se(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):m(A))}function m(A){return A===45||A===58?T(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):B(A)}function C(A){return fe(A)?se(e,T,"whitespace")(A):T(A)}function T(A){return A===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),E):A===45?(u+=1,E(A)):A===null||K(A)?v(A):B(A)}function E(A){return A===45?(e.enter("tableDelimiterFiller"),b(A)):B(A)}function b(A){return A===45?(e.consume(A),b):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(A))}function y(A){return fe(A)?se(e,v,"whitespace")(A):v(A)}function v(A){return A===124?m(A):A===null||K(A)?!a||i!==u?B(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):B(A)}function B(A){return r(A)}function _(A){return e.enter("tableRow"),I(A)}function I(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),I):A===null||K(A)?(e.exit("tableRow"),t(A)):fe(A)?se(e,I,"whitespace")(A):(e.enter("data"),N(A))}function N(A){return A===null||A===124||Se(A)?(e.exit("data"),I(A)):(e.consume(A),A===92?R:N)}function R(A){return A===92||A===124?(e.consume(A),N):N(A)}}function p8(e,t){let r=-1,n=!0,i=0,u=[0,0,0,0],a=[0,0,0,0],o=!1,s=0,l,c,f,h=new hc;for(;++r<e.length;){let p=e[r],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,s!==0&&(F2(h,t,s,l,c),c=void 0,s=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(r,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,f=void 0,u=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(r,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(u[1]!==0&&(a[0]=a[1],f=mc(h,t,u,i,void 0,f),u=[0,0,0,0]),a[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(u[1]!==0&&(a[0]=a[1],f=mc(h,t,u,i,void 0,f)),u=a,a=[u[1],r,0,0])):m.type==="tableHead"?(o=!0,s=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=r,u[1]!==0?(a[0]=a[1],f=mc(h,t,u,i,r,f)):a[1]!==0&&(f=mc(h,t,a,i,r,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=r)}for(s!==0&&F2(h,t,s,l,c),h.consume(t.events),r=-1;++r<t.events.length;){let p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=_2(t.events,r))}return e}function mc(e,t,r,n,i,u){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(u.end=Object.assign({},ha(t.events,r[0])),e.add(r[0],0,[["exit",u,t]]));let s=ha(t.events,r[1]);if(u={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(r[1],0,[["enter",u,t]]),r[2]!==0){let l=ha(t.events,r[2]),c=ha(t.events,r[3]),f={type:o,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){let h=t.events[r[2]],p=t.events[r[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,C=r[3]-r[2]-1;e.add(m,C,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(u.end=Object.assign({},ha(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function F2(e,t,r,n,i){let u=[],a=ha(t.events,r);i&&(i.end=Object.assign({},a),u.push(["exit",i,t])),n.end=Object.assign({},a),u.push(["exit",n,t]),e.add(r+1,0,u)}function ha(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var h8={tokenize:m8};function um(){return{text:{91:h8}}}function m8(e,t,r){let n=this;return i;function i(s){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),u)}function u(s){return Se(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),a):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),a):r(s)}function a(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(s)}function o(s){return K(s)?t(s):fe(s)?e.check({tokenize:E8},t,r)(s):r(s)}}function E8(e,t,r){return se(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function b2(e){return ql([em(),rm(),nm(e),im(),um()])}var D8={};function _i(e){let t=this,r=e||D8,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),u=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(b2(r)),u.push(Xh()),a.push(Qh(r))}import g8 from"node:fs";import A8 from"node:path";function am(e,t,r){let n=k2(e);if(!r&&typeof t=="function"&&(r=t,t=void 0),!r)return new Promise(u);u(i,r);function i(a){r(void 0,a)}function u(a,o){let s;try{s=A8.resolve(n.cwd,n.path)}catch(c){return o(c)}g8.readFile(s,t,l);function l(c,f){c?o(c):(n.value=f,a(n))}}}function k2(e){return typeof e=="string"||e instanceof URL?e={path:e}:T8(e)&&(e={path:new TextDecoder().decode(e)}),C8(e)?e:new Kn(e)}function C8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function T8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}async function Fi(e,t,r,n,i,u,a){let o=await t({additionalConfig:u,additionalRules:a});u=o;let s=U0(e),l=P0(s,i,n,"md"),c=[],f=r(o);for(let{input:h,name:p,output:m}of l){let C=await am(h),T=await f.process(C);T.dirname=m,T.basename=p,c.push(T)}return c}async function Fu(e,t,r,n,i){let u=await t({additionalConfig:n,additionalRules:i});return n=u,r(u).process(new Kn(e))}function ma(e){return pa().use({settings:{bullet:"-",emphasis:"_"}}).use(_i).use(()=>async function(r,n){Hp(r,n),yp(r,n,e),await Bg(r,n,e)})}function ls(e){return pa().use({settings:{bullet:"-",emphasis:"_"}}).use(_i).use(()=>function(r,n){Hp(r,n),yp(r,n,e)})}function Ea(e){return pa().use({settings:{bullet:"-",emphasis:"_"}}).use(_i).use(()=>async function(r,n){await GD(r,n,{...e,paranoid:!1})})}async function x8(e,t,r,n,i){return Fi(e,on,ma,t,r,n,i)}async function y8(e,t,r){return Fu(e,on,ma,t,r)}async function _8(e,t,r,n,i){return Fi(e,on,Ea,t,r,n,i)}async function F8(e,t,r){return Fu(e,on,Ea,t,r)}async function b8(e,t,r,n,i){return Fi(e,on,ls,t,r,n,i)}async function k8(e,t,r){return Fu(e,on,ls,t,r)}var Ec={badges:{async content(e){let t=Te.object({custom:Te.record(Te.object({image:Te.string(),link:Te.string()})).optional(),npm:Te.array(Te.string()).optional()}).optional().parse(e),r=await wr(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[![NPM Package ${n}](https://img.shields.io/npm/v/${n}.svg)](https://npmjs.com/package/${n})`),t?.npm!==void 0)for(let a of t.npm)i.push(`[![NPM Package ${a}](https://img.shields.io/npm/v/${a}.svg)](https://npmjs.com/package/${a})`);let{license:u}=r;if(u!==void 0&&i.push(`[![License: ${u}](https://img.shields.io/badge/License-${u}-yellow.svg)](https://opensource.org/licenses/${u})`),t?.custom!==void 0)for(let[a,{image:o,link:s}]of Object.entries(t.custom))i.push(`[![${a}](${o})](${s})`);return i.join(`
106
- `)},order:3}};import{globby as S8}from"globby";import Dc from"node:path";import{readPackage as I8}from"read-pkg";var gc={banner:{async content(e){let t=Te.object({alt:Te.string().optional(),src:Te.string().optional()}).optional().parse(e),{assetsPath:r,packageFile:n}=await mu();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await S2(r)??await S2();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!I2(i)&&!await Mu(i))throw new Error(`Banner image not found at "${i}"`);let u=t?.alt??`${(await I8({cwd:Dc.dirname(n)})).name} banner`;if(u===void 0||u==="undefined banner")throw new Error("Banner image alt text not available");return`![${u}](${i})`},order:2}};async function S2(e){let{packageFile:t}=await mu();if(t===void 0)throw new Error("No package.json found");let r=Dc.dirname(t),n=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],u=["png","gif","jpg","jpeg","svg","webp"],a=await S8(n.map(o=>Dc.join(r,o)),{deep:1,expandDirectories:{extensions:u,files:i}});if(a.length>0)return Dc.relative(process.cwd(),a[0])}function I2(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?I2(`https://${e}`,!1):!1}}function B2(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=B8(e,t);return r.push(v8(n)),r.push(N8(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(R8(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(O8(n)),r.push(w8(e,n)),e.positionals&&!n.commandsOnly&&r.push(om(["Positional Argument","Description","Type","Default"],e.positionals.map(i=>[i.arguments?[i.arguments.map(u=>`\`${u}\``)].join(" "):"",`${i.description??""}${i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),e.commands&&r.push(om(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments?.map(u=>`\`${u}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!n.commandsOnly&&r.push(om(["Option","Alias","Argument","Description","Type","Default"],e.options.map(i=>[i.flags?i.flags.map(u=>`\`${u}\``).join(" "):"",i.aliases?i.aliases.map(u=>`\`${u}\``).join(" "):"",i.arguments?i.arguments.map(u=>`\`${u}\``).join(" "):"",i.description??"",i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),n.canRecurse&&n.hasMultipleSubcommands&&r.push("_See the sections below for more information on each subcommand._"),r.join(`
106
+ `)},order:3}};import{globby as S8}from"globby";import Dc from"node:path";import{readPackage as I8}from"read-pkg";var gc={banner:{async content(e){let t=Te.object({alt:Te.string().optional(),src:Te.string().optional()}).optional().parse(e),{assetsPath:r,packageFile:n}=await mu();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await S2(r)??await S2();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!I2(i)&&!await Mu(i))throw new Error(`Banner image not found at "${i}"`);let u=t?.alt??`${(await I8({cwd:Dc.dirname(n)})).name} banner`;if(u===void 0||u==="undefined banner")throw new Error("Banner image alt text not available");return`![${u}](${i})`},order:2}};async function S2(e){let{packageFile:t}=await mu();if(t===void 0)throw new Error("No package.json found");let r=Dc.dirname(t),n=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],u=["png","gif","jpg","jpeg","svg","webp"],a=await S8(n.map(o=>Dc.join(r,o)),{deep:1,expandDirectories:{extensions:u,files:i}});if(a.length>0)return Dc.relative(process.cwd(),a[0])}function I2(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?I2(`https://${e}`,!1):!1}}function B2(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=B8(e,t);return r.push(v8(n)),r.push(N8(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(R8(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(O8(n)),r.push(w8(e,n)),e.positionals&&!n.commandsOnly&&r.push(om(["Positional Argument","Description","Type","Default"],e.positionals.map(i=>[i.arguments?[i.arguments.map(u=>`\`${u}\``)].join(" "):"",`${i.description??""}${i.required===void 0?"":i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),e.commands&&r.push(om(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments?.map(u=>`\`${u}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!n.commandsOnly&&r.push(om(["Option","Argument","Description","Type","Default"],e.options.map(i=>[i.flags!==void 0||i.aliases!==void 0?[...i.flags??[],...i.aliases??[]].map(u=>`\`${u}\``).join("<br>"):"",i.arguments?i.arguments.map(u=>`\`${u}\``).join(" "):"",i.description??"",i.choices?i.choices.map(u=>`\`${u}\``).join(" "):i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")&&i.choices===void 0?i.defaultValue:`\`${i.defaultValue}\``:""]))),n.canRecurse&&n.hasMultipleSubcommands&&r.push("_See the sections below for more information on each subcommand._"),r.join(`
107
107
 
108
108
  `)}function B8(e,t){let r=e.subcommandName===void 0,n=e.commands?e.commands.length>1:!1,i=t>1,u=e.commands?.find(l=>l.default),a=e.commands?.find(l=>l.commandName===void 0),o=`${e.commandName}${e.subcommandName?` ${e.subcommandName}`:""}`,s=i&&n&&u?.commandName!==void 0;return{canRecurse:i,commandsOnly:s,defaultCommand:u,fullCommandName:o,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:a}}function v8(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function N8(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(r=>r!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function R8(e){return`This section lists top-level commands for \`${e}\`.`}function O8(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function w8(e,t){let r=t.topLevelCommand?.arguments?` ${t.topLevelCommand.arguments.join(" ")}`:`${e.arguments?` ${e.arguments.join(" ")}`:""}`;return`Usage:
109
109
 
@@ -219,7 +219,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
219
219
  `)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),ne(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
220
220
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
221
221
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
222
- For further details.`);this.skipValidations=ne(r,"skipValidations")?r.skipValidations:Er.skipValidations}};Os.DEFER_DEFINITION_ERRORS_HANDLING=!1;vy(Os,[hf,Df,Tf,xf,_f,yf,Ff,bf,kf,Bf]);var wu=class extends Os{constructor(t,r=Er){let n=Qe(r);n.outputCst=!0,super(t,n)}};var Nf=Ae({name:"flag",pattern:/--[\w-_]+/}),Km=Ae({longer_alt:Nf,name:"alias",pattern:/-[A-Za-z]/}),Ny=Ae({group:Ne.SKIPPED,name:"comma",pattern:/,/}),Ry=Ae({group:Ne.SKIPPED,name:"dollar",pattern:/\$/}),vf=Ae({group:Ne.SKIPPED,name:"whiteSpace",pattern:/ /}),Oy=Ae({group:Ne.SKIPPED,name:"newLine",pattern:/\n/}),Zm=Ae({name:"word",pattern:/\S+/}),Ls=Ae({name:"argument",pattern:/(<\S+>|\[.+])/}),Xm=Ae({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),wy=Ae({group:Ne.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Ly=Ae({group:Ne.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Qm=Ae({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Jm=Ae({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),e0=Ae({name:"rowDescription",pattern:/\w.+/}),Py=Ae({group:Ne.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),My=Ae({group:Ne.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),gj=new Ne({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[wy,Qm,Xm,Oy,vf],OPTIONS_MODE:[My,Jm],ROW_MODE:[Py,Km,Nf,Ny,Ls,e0,vf],USAGE_MODE:[Ly,Ry,Ls,Zm,vf]}}),Aj=[Nf,Km,Ny,Ry,vf,Oy,Zm,Ls,Xm,wy,Ly,Qm,Jm,e0,Py,My],Wm=class extends wu{programHelp=this.RULE("programHelp",()=>{this.CONSUME(Xm,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Zm,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Ls)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Qm),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Jm),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Ls)},{ALT:()=>this.CONSUME(Km)},{ALT:()=>this.CONSUME(Nf)},{ALT:()=>this.CONSUME(e0,{LABEL:"description"})}])})});constructor(){super(Aj),this.performSelfAnalysis()}},ws=new Wm,Ym=class extends ws.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=Rf(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:n}}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}},Cj=new Ym;function Uy(e){let t=gj.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);ws.input=t.tokens;let r=ws.programHelp();if(ws.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(ws.errors,void 0,2)}`);let n;try{n=Cj.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var i0=Ae({name:"flag",pattern:/--[\w-_]+/}),u0=Ae({name:"alias",pattern:/-[A-Za-z]/}),Hy=Ae({group:Ne.SKIPPED,name:"comma",pattern:/,/}),Xa=Ae({name:"word",pattern:/\S+/}),Ms=Ae({name:"argument",pattern:/<\S+>|\[\S+]/}),a0=Ae({name:"type",pattern:/\[(boolean|string|array)]/}),o0=Ae({name:"defaultInfo",pattern:/\[default]/}),s0=Ae({name:"required",pattern:/\[required]/}),l0=Ae({name:"defaultInfoDescription",pattern:/\[default:\s.+?]/}),c0=Ae({name:"choices",pattern:/\[choices:\s.+?]/}),t0=Ae({group:Ne.SKIPPED,name:"whiteSpace",pattern:/\s/}),Gy=Ae({group:Ne.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),f0=Ae({name:"programDescription",pattern:/.+/}),jy=Ae({group:Ne.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),d0=Ae({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),p0=Ae({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),h0=Ae({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),m0=Ae({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),E0=Ae({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),D0=Ae({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),qy=Ae({group:Ne.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),zy=Ae({group:Ne.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),Tj=new Ne({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[d0,p0,h0,Gy,Ms,Xa,t0],PROGRAM_DESCRIPTION_MODE:[jy,f0],ROW_MODE:[qy,Hy,a0,E0,D0,l0,o0,s0,c0,i0,u0,Ms,Xa,t0],SECTION_MODE:[m0,zy]}}),xj=[i0,u0,Hy,Xa,Ms,a0,o0,s0,l0,c0,t0,Gy,f0,jy,d0,p0,h0,m0,E0,D0,qy,zy],r0=class extends wu{programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Xa,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Ms)}),this.OPTION(()=>{this.CONSUME(f0,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(p0),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(h0),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(d0),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(m0),this.OPTION(()=>{this.CONSUME(Xa,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Xa,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Ms)},{ALT:()=>this.CONSUME(u0)},{ALT:()=>this.CONSUME(i0)},{ALT:()=>this.CONSUME(E0,{LABEL:"description"})},{ALT:()=>this.CONSUME(D0,{LABEL:"description"})},{ALT:()=>this.CONSUME(a0)},{ALT:()=>this.CONSUME(s0)},{ALT:()=>this.CONSUME(l0)},{ALT:()=>this.CONSUME(o0)},{ALT:()=>this.CONSUME(c0)}])})});constructor(){super(xj),this.performSelfAnalysis()}},Ps=new r0,n0=class extends Ps.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=Rf(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:n}}positionalsSection(t){return t.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}commandsSection(t){return t.sectionRow.map(r=>this.visit(r))}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}positionalParentCommandToArguments(t){let{arguments:r,parentCommandName:n,...i}=t;return n===void 0?t:{arguments:[n,...r??[]],...i}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},yj=new n0;function Vy(e){let t=Tj.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Ps.input=t.tokens;let r=Ps.programHelp();if(Ps.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Ps.errors,void 0,2)}`);let n;try{n=yj.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var $y={meow:Uy,yargs:Vy};function Rf(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0&&e===void 0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let r=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:r}}function Wy(e){for(let[t,r]of Object.entries($y)){ct.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&ct.info(`Error in "${t}" parser: ${String(n)}`);continue}}ct.error("Could not parse help string with any parser")}import{execaCommand as _j}from"execa";async function g0(e,t="--help",r){let n=`${e} ${t}`,i=await kj(n),u=Wy(i);return u===void 0?(ct.warn("Falling back to basic cli help text output."),bj(i)):Fj(e,t,r??Number.MAX_SAFE_INTEGER,u)}async function Fj(e,t,r,n){if(r<=0)return ct.info("Max CLI command help depth reached, stopping recursion"),"";let i=B2(n,r),u=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let o=await g0(`${u} ${a.commandName}`,t,r-1);if(o==="")return i;i+=`
222
+ For further details.`);this.skipValidations=ne(r,"skipValidations")?r.skipValidations:Er.skipValidations}};Os.DEFER_DEFINITION_ERRORS_HANDLING=!1;vy(Os,[hf,Df,Tf,xf,_f,yf,Ff,bf,kf,Bf]);var wu=class extends Os{constructor(t,r=Er){let n=Qe(r);n.outputCst=!0,super(t,n)}};var Nf=Ae({name:"flag",pattern:/--[\w-_]+/}),Km=Ae({longer_alt:Nf,name:"alias",pattern:/-[A-Za-z]/}),Ny=Ae({group:Ne.SKIPPED,name:"comma",pattern:/,/}),Ry=Ae({group:Ne.SKIPPED,name:"dollar",pattern:/\$/}),vf=Ae({group:Ne.SKIPPED,name:"whiteSpace",pattern:/ /}),Oy=Ae({group:Ne.SKIPPED,name:"newLine",pattern:/\n/}),Zm=Ae({name:"word",pattern:/\S+/}),Ls=Ae({name:"argument",pattern:/(<\S+>|\[.+])/}),Xm=Ae({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),wy=Ae({group:Ne.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Ly=Ae({group:Ne.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Qm=Ae({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Jm=Ae({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),e0=Ae({name:"rowDescription",pattern:/\w.+/}),Py=Ae({group:Ne.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),My=Ae({group:Ne.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),gj=new Ne({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[wy,Qm,Xm,Oy,vf],OPTIONS_MODE:[My,Jm],ROW_MODE:[Py,Km,Nf,Ny,Ls,e0,vf],USAGE_MODE:[Ly,Ry,Ls,Zm,vf]}}),Aj=[Nf,Km,Ny,Ry,vf,Oy,Zm,Ls,Xm,wy,Ly,Qm,Jm,e0,Py,My],Wm=class extends wu{programHelp=this.RULE("programHelp",()=>{this.CONSUME(Xm,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Zm,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Ls)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Qm),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Jm),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Ls)},{ALT:()=>this.CONSUME(Km)},{ALT:()=>this.CONSUME(Nf)},{ALT:()=>this.CONSUME(e0,{LABEL:"description"})}])})});constructor(){super(Aj),this.performSelfAnalysis()}},ws=new Wm,Ym=class extends ws.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=Rf(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:n}}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}},Cj=new Ym;function Uy(e){let t=gj.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);ws.input=t.tokens;let r=ws.programHelp();if(ws.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(ws.errors,void 0,2)}`);let n;try{n=Cj.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var i0=Ae({name:"flag",pattern:/--[\w-_]+/}),u0=Ae({name:"alias",pattern:/-[A-Za-z]/}),Hy=Ae({group:Ne.SKIPPED,name:"comma",pattern:/,/}),Xa=Ae({name:"word",pattern:/\S+/}),Ms=Ae({name:"argument",pattern:/<\S+>|\[\S+]/}),a0=Ae({name:"type",pattern:/\[(boolean|string|array|number)]/}),o0=Ae({name:"defaultInfo",pattern:/\[default]/}),s0=Ae({name:"required",pattern:/\[required]/}),l0=Ae({name:"defaultInfoDescription",pattern:/\[default:\s.+?]/}),c0=Ae({name:"choices",pattern:/\[choices:\s.+?]/}),t0=Ae({group:Ne.SKIPPED,name:"whiteSpace",pattern:/\s/}),Gy=Ae({group:Ne.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),f0=Ae({name:"programDescription",pattern:/.+/}),jy=Ae({group:Ne.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),d0=Ae({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),p0=Ae({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),h0=Ae({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),m0=Ae({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),E0=Ae({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),D0=Ae({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),qy=Ae({group:Ne.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),zy=Ae({group:Ne.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),Tj=new Ne({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[d0,p0,h0,Gy,Ms,Xa,t0],PROGRAM_DESCRIPTION_MODE:[jy,f0],ROW_MODE:[qy,Hy,a0,E0,D0,l0,o0,s0,c0,i0,u0,Ms,Xa,t0],SECTION_MODE:[m0,zy]}}),xj=[i0,u0,Hy,Xa,Ms,a0,o0,s0,l0,c0,t0,Gy,f0,jy,d0,p0,h0,m0,E0,D0,qy,zy],r0=class extends wu{programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Xa,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Ms)}),this.OPTION(()=>{this.CONSUME(f0,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(p0),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(h0),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(d0),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(m0),this.OPTION(()=>{this.CONSUME(Xa,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Xa,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Ms)},{ALT:()=>this.CONSUME(u0)},{ALT:()=>this.CONSUME(i0)},{ALT:()=>this.CONSUME(E0,{LABEL:"description"})},{ALT:()=>this.CONSUME(D0,{LABEL:"description"})},{ALT:()=>this.CONSUME(a0)},{ALT:()=>this.CONSUME(s0)},{ALT:()=>this.CONSUME(l0)},{ALT:()=>this.CONSUME(o0)},{ALT:()=>this.CONSUME(c0)}])})});constructor(){super(xj),this.performSelfAnalysis()}},Ps=new r0,n0=class extends Ps.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=Rf(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:n}}positionalsSection(t){return t.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}commandsSection(t){return t.sectionRow.map(r=>this.visit(r))}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}positionalParentCommandToArguments(t){let{arguments:r,parentCommandName:n,...i}=t;return n===void 0?t:{arguments:[n,...r??[]],...i}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},yj=new n0;function Vy(e){let t=Tj.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Ps.input=t.tokens;let r=Ps.programHelp();if(Ps.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Ps.errors,void 0,2)}`);let n;try{n=yj.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var $y={meow:Uy,yargs:Vy};function Rf(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0&&e===void 0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let r=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:r}}function Wy(e){for(let[t,r]of Object.entries($y)){ct.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&ct.info(`Error in "${t}" parser: ${String(n)}`);continue}}ct.error("Could not parse help string with any parser")}import{execaCommand as _j}from"execa";async function g0(e,t="--help",r){let n=`${e} ${t}`,i=await kj(n),u=Wy(i);return u===void 0?(ct.warn("Falling back to basic cli help text output."),bj(i)):Fj(e,t,r??Number.MAX_SAFE_INTEGER,u)}async function Fj(e,t,r,n){if(r<=0)return ct.info("Max CLI command help depth reached, stopping recursion"),"";let i=B2(n,r),u=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let o=await g0(`${u} ${a.commandName}`,t,r-1);if(o==="")return i;i+=`
223
223
 
224
224
  ${o}`}return i}function bj(e){return`\`\`\`txt
225
225
  ${e}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdat",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "description": "CLI tool and library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.",
6
6
  "repository": {
@@ -59,7 +59,7 @@
59
59
  "which": "^4.0.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@kitschpatrol/shared-config": "^4.6.7",
62
+ "@kitschpatrol/shared-config": "^4.7.1",
63
63
  "bumpp": "^9.4.1",
64
64
  "chalk": "^5.3.0",
65
65
  "chevrotain": "^11.0.3",
package/readme.md CHANGED
@@ -264,18 +264,18 @@ mdat expand <files..> [options]
264
264
  | ------------------- | -------------------------------------------------------------- | -------- |
265
265
  | `files` | Markdown file(s) with MDAT placeholder comments. _(Required.)_ | `string` |
266
266
 
267
- | Option | Alias | Description | Type | Default |
268
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
269
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
270
- | `--rules` | `-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
271
- | `--output` | `-o` | Output file directory. | `string` | Same directory as input file. |
272
- | `--name` | `-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
273
- | `--meta` | `-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
274
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
275
- | `--print` | | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
276
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
277
- | `--help` | `-h` | Show help | `boolean` | |
278
- | `--version` | `-v` | Show version number | `boolean` | |
267
+ | Option | Description | Type | Default |
268
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
269
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
270
+ | `--rules`<br>`-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
271
+ | `--output`<br>`-o` | Output file directory. | `string` | Same directory as input file. |
272
+ | `--name`<br>`-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
273
+ | `--meta`<br>`-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
274
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
275
+ | `--print` | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
276
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
277
+ | `--help`<br>`-h` | Show help | `boolean` | |
278
+ | `--version`<br>`-v` | Show version number | `boolean` | |
279
279
 
280
280
  #### Subcommand: `mdat check`
281
281
 
@@ -291,15 +291,15 @@ mdat check <files..> [options]
291
291
  | ------------------- | -------------------------------------------------------------- | -------- |
292
292
  | `files` | Markdown file(s) with MDAT placeholder comments. _(Required.)_ | `string` |
293
293
 
294
- | Option | Alias | Description | Type | Default |
295
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
296
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
297
- | `--rules` | `-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
298
- | `--meta` | `-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
299
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
300
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
301
- | `--help` | `-h` | Show help | `boolean` | |
302
- | `--version` | `-v` | Show version number | `boolean` | |
294
+ | Option | Description | Type | Default |
295
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
296
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
297
+ | `--rules`<br>`-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
298
+ | `--meta`<br>`-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
299
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
300
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
301
+ | `--help`<br>`-h` | Show help | `boolean` | |
302
+ | `--version`<br>`-v` | Show version number | `boolean` | |
303
303
 
304
304
  #### Subcommand: `mdat collapse`
305
305
 
@@ -315,16 +315,16 @@ mdat collapse <files..> [options]
315
315
  | ------------------- | -------------------------------------------------------------- | -------- |
316
316
  | `files` | Markdown file(s) with MDAT placeholder comments. _(Required.)_ | `string` |
317
317
 
318
- | Option | Alias | Description | Type | Default |
319
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
320
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
321
- | `--output` | `-o` | Output file directory. | `string` | Same directory as input file. |
322
- | `--name` | `-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
323
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
324
- | `--print` | | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
325
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
326
- | `--help` | `-h` | Show help | `boolean` | |
327
- | `--version` | `-v` | Show version number | `boolean` | |
318
+ | Option | Description | Type | Default |
319
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
320
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
321
+ | `--output`<br>`-o` | Output file directory. | `string` | Same directory as input file. |
322
+ | `--name`<br>`-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
323
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
324
+ | `--print` | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
325
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
326
+ | `--help`<br>`-h` | Show help | `boolean` | |
327
+ | `--version`<br>`-v` | Show version number | `boolean` | |
328
328
 
329
329
  #### Subcommand: `mdat readme`
330
330
 
@@ -359,24 +359,24 @@ Usage:
359
359
  mdat readme expand [files..] [options]
360
360
  ```
361
361
 
362
- | Positional Argument | Description | Type |
363
- | ------------------- | ----------------------------------------------------------------------------------------------------------------- | -------- |
364
- | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. _(Optional.)_ | `string` |
365
-
366
- | Option | Alias | Description | Type | Default |
367
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
368
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
369
- | `--rules` | `-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
370
- | `--output` | `-o` | Output file directory. | `string` | Same directory as input file. |
371
- | `--name` | `-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
372
- | `--package` | | Path to the package.json file to use to populate the readme. | `string` | The closest package.json file is used by default. |
373
- | `--assets` | | Path to find and save readme-related assets. | `string` | `./assets` |
374
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
375
- | `--meta` | `-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
376
- | `--print` | | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
377
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
378
- | `--help` | `-h` | Show help | `boolean` | |
379
- | `--version` | `-v` | Show version number | `boolean` | |
362
+ | Positional Argument | Description | Type |
363
+ | ------------------- | --------------------------------------------------------------------------------------------------- | -------- |
364
+ | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. | `string` |
365
+
366
+ | Option | Description | Type | Default |
367
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
368
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
369
+ | `--rules`<br>`-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
370
+ | `--output`<br>`-o` | Output file directory. | `string` | Same directory as input file. |
371
+ | `--name`<br>`-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
372
+ | `--package` | Path to the package.json file to use to populate the readme. | `string` | The closest package.json file is used by default. |
373
+ | `--assets` | Path to find and save readme-related assets. | `string` | `./assets` |
374
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
375
+ | `--meta`<br>`-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
376
+ | `--print` | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
377
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
378
+ | `--help`<br>`-h` | Show help | `boolean` | |
379
+ | `--version`<br>`-v` | Show version number | `boolean` | |
380
380
 
381
381
  #### Subcommand: `mdat readme check`
382
382
 
@@ -388,21 +388,21 @@ Usage:
388
388
  mdat readme check [files..] [options]
389
389
  ```
390
390
 
391
- | Positional Argument | Description | Type |
392
- | ------------------- | ----------------------------------------------------------------------------------------------------------------- | -------- |
393
- | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. _(Optional.)_ | `string` |
394
-
395
- | Option | Alias | Description | Type | Default |
396
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
397
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
398
- | `--rules` | `-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
399
- | `--package` | | Path to the package.json file to use to populate the readme. | `string` | The closest package.json file is used by default. |
400
- | `--assets` | | Path to find and save readme-related assets. | `string` | `./assets` |
401
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
402
- | `--meta` | `-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
403
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
404
- | `--help` | `-h` | Show help | `boolean` | |
405
- | `--version` | `-v` | Show version number | `boolean` | |
391
+ | Positional Argument | Description | Type |
392
+ | ------------------- | --------------------------------------------------------------------------------------------------- | -------- |
393
+ | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. | `string` |
394
+
395
+ | Option | Description | Type | Default |
396
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
397
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
398
+ | `--rules`<br>`-r` | Path(s) to files containing MDAT comment expansion rules. | `array` | |
399
+ | `--package` | Path to the package.json file to use to populate the readme. | `string` | The closest package.json file is used by default. |
400
+ | `--assets` | Path to find and save readme-related assets. | `string` | `./assets` |
401
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
402
+ | `--meta`<br>`-m` | Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically. | `boolean` | |
403
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
404
+ | `--help`<br>`-h` | Show help | `boolean` | |
405
+ | `--version`<br>`-v` | Show version number | `boolean` | |
406
406
 
407
407
  #### Subcommand: `mdat readme collapse`
408
408
 
@@ -414,20 +414,20 @@ Usage:
414
414
  mdat readme collapse [files..] [options]
415
415
  ```
416
416
 
417
- | Positional Argument | Description | Type |
418
- | ------------------- | ----------------------------------------------------------------------------------------------------------------- | -------- |
419
- | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. _(Optional.)_ | `string` |
420
-
421
- | Option | Alias | Description | Type | Default |
422
- | ----------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
423
- | `--output` | `-o` | Output file directory. | `string` | Same directory as input file. |
424
- | `--name` | `-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
425
- | `--print` | | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
426
- | `--config` | | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
427
- | `--prefix` | | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
428
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
429
- | `--help` | `-h` | Show help | `boolean` | |
430
- | `--version` | `-v` | Show version number | `boolean` | |
417
+ | Positional Argument | Description | Type |
418
+ | ------------------- | --------------------------------------------------------------------------------------------------- | -------- |
419
+ | `files` | Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used. | `string` |
420
+
421
+ | Option | Description | Type | Default |
422
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
423
+ | `--output`<br>`-o` | Output file directory. | `string` | Same directory as input file. |
424
+ | `--name`<br>`-n` | Output file name. | `string` | Same name as input file. Overwrites the input file. |
425
+ | `--print` | Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options. | `boolean` | |
426
+ | `--config` | Path(s) to files containing MDAT configuration. | `array` | Configuration is loaded if found from the usual places, or defaults are used. |
427
+ | `--prefix` | Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety. | `string` | |
428
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
429
+ | `--help`<br>`-h` | Show help | `boolean` | |
430
+ | `--version`<br>`-v` | Show version number | `boolean` | |
431
431
 
432
432
  #### Subcommand: `mdat readme init`
433
433
 
@@ -439,17 +439,17 @@ Usage:
439
439
  mdat readme init [options]
440
440
  ```
441
441
 
442
- | Option | Alias | Description | Type | Default |
443
- | --------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------- |
444
- | `--interactive` | `-i` | Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt. | `boolean` | `true` |
445
- | `--overwrite` | | Replace an existing readme file if one is found. | `boolean` | `false`, if an existing readme is found, don't touch it. |
446
- | `--output` | `-o` | Output file directory. | `string` | Same directory as input file. |
447
- | `--expand` | `-e` | Automatically run `mdat readme` immediately after creating the readme template. | `boolean` | `true` |
448
- | `--template` | `-t` | Specify a template to use for the new readme. | `string` | "MDAT Readme" |
449
- | `--compound` | `-c` | Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical. | `boolean` | `true` |
450
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
451
- | `--help` | `-h` | Show help | `boolean` | |
452
- | `--version` | `-v` | Show version number | `boolean` | |
442
+ | Option | Description | Type | Default |
443
+ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------- |
444
+ | `--interactive`<br>`-i` | Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt. | `boolean` | `true` |
445
+ | `--overwrite` | Replace an existing readme file if one is found. | `boolean` | `false`, if an existing readme is found, don't touch it. |
446
+ | `--output`<br>`-o` | Output file directory. | `string` | Same directory as input file. |
447
+ | `--expand`<br>`-e` | Automatically run `mdat readme` immediately after creating the readme template. | `boolean` | `true` |
448
+ | `--template`<br>`-t` | Specify a template to use for the new readme. | `"MDAT Readme"` `"Standard Readme Basic"` `"Standard Readme Full"` | `"MDAT Readme"` |
449
+ | `--compound`<br>`-c` | Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical. | `boolean` | `true` |
450
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection. | `boolean` | |
451
+ | `--help`<br>`-h` | Show help | `boolean` | |
452
+ | `--version`<br>`-v` | Show version number | `boolean` | |
453
453
 
454
454
  <!-- /cli-help -->
455
455
 
package/dist/.DS_Store DELETED
Binary file