mdat 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.1";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(`
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdat",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
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/dist/.DS_Store DELETED
Binary file