mdat 0.6.15 → 0.6.16
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 +1 -1
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var hS=Object.create;var jh=Object.defineProperty;var pS=Object.getOwnPropertyDescriptor;var mS=Object.getOwnPropertyNames;var gS=Object.getPrototypeOf,ES=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 Gh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),DS=(e,t)=>{for(var n in t)jh(e,n,{get:t[n],enumerable:!0})},AS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mS(t))!ES.call(e,i)&&i!==n&&jh(e,i,{get:()=>t[i],enumerable:!(r=pS(t,i))||r.enumerable});return e};var XE=(e,t,n)=>(n=e!=null?hS(gS(e)):{},AS(t||!e||!e.__esModule?jh(n,"default",{value:e,enumerable:!0}):n,e));var ED=Gh(($Y,YS)=>{YS.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=Gh((VY,DD)=>{"use strict";var KS=ED();DD.exports=new Map(Object.entries(KS))});var bT=Gh((one,_T)=>{"use strict";var If=Object.prototype.hasOwnProperty,yT=Object.prototype.toString,ET=Object.defineProperty,DT=Object.getOwnPropertyDescriptor,AT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):yT.call(t)==="[object Array]"},CT=function(t){if(!t||yT.call(t)!=="[object Object]")return!1;var n=If.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&If.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||If.call(t,i)},TT=function(t,n){ET&&n.name==="__proto__"?ET(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},xT=function(t,n){if(n==="__proto__")if(If.call(t,n)){if(DT)return DT(t,n).value}else return;return t[n]};_T.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=xT(o,n),i=xT(t,n),o!==i&&(c&&i&&(CT(i)||(u=AT(i)))?(u?(u=!1,s=r&&AT(r)?r:[]):s=r&&CT(r)?r:{},TT(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&TT(o,{name:n,newValue:i}));return o}});var JE="0.6.15";import{defaultLoaders as TS}from"cosmiconfig";function qh(e,t){let n=TS[".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 vS from"node:fs";import Ci from"node:path";import FS from"node:process";import xS from"node:process";import yS from"node:fs/promises";import{fileURLToPath as _S}from"node:url";import Gs from"node:path";var tD=e=>e instanceof URL?_S(e):e;async function cc(e,{cwd:t=xS.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 yS.stat(s);if(n==="file"&&o.isFile()||n==="directory"&&o.isDirectory())return s}catch{}i=Gs.dirname(i)}}async function nD({cwd:e=FS.cwd()}={}){return cc("package.json",{cwd:e})}import kS,{promises as SS}from"fs";async function zh(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return(await SS[e](n))[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}function $h(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return kS[e](n)[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}var qs=zh.bind(null,"stat","isFile"),AY=zh.bind(null,"stat","isDirectory"),CY=zh.bind(null,"lstat","isSymbolicLink"),Vh=$h.bind(null,"statSync","isFile"),TY=$h.bind(null,"statSync","isDirectory"),xY=$h.bind(null,"lstatSync","isSymbolicLink");import IS from"node:os";var rD=IS.homedir();function Wh(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return rD?e.replace(/^~(?=$|\/|\\)/,rD):e}function OS(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?`-${OS(u+1,e.length+1)}`:"",a=BS(s,t,n,r,o);i.push(a)}return i}function BS(e,t,n,r,i=""){let u=iD(e),s=t?iD(t):void 0;if(!Vh(u))throw new Error(`Input file not found: "${u}"`);if(s){if(Vh(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);vS.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 Wh(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),wS=Object.keys(St.color),NS=Object.keys(St.bgColor),wY=[...wS,...NS];function RS(){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 LS=RS(),wr=LS;import Yh from"node:process";import PS from"node:os";import lD from"node:tty";function mr(e,t=globalThis.Deno?globalThis.Deno.args:Yh.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}=Yh,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 MS(){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 US(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function HS(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=MS();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(Yh.platform==="win32"){let s=PS.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=HS(e,{streamIsTTY:e&&e.isTTY,...t});return US(n)}var jS={stdout:cD({isTTY:lD.isatty(1)}),stderr:cD({isTTY:lD.isatty(2)})},fD=jS;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 hS=Object.create;var jh=Object.defineProperty;var pS=Object.getOwnPropertyDescriptor;var mS=Object.getOwnPropertyNames;var gS=Object.getPrototypeOf,ES=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 Gh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),DS=(e,t)=>{for(var n in t)jh(e,n,{get:t[n],enumerable:!0})},AS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mS(t))!ES.call(e,i)&&i!==n&&jh(e,i,{get:()=>t[i],enumerable:!(r=pS(t,i))||r.enumerable});return e};var XE=(e,t,n)=>(n=e!=null?hS(gS(e)):{},AS(t||!e||!e.__esModule?jh(n,"default",{value:e,enumerable:!0}):n,e));var ED=Gh(($Y,YS)=>{YS.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=Gh((VY,DD)=>{"use strict";var KS=ED();DD.exports=new Map(Object.entries(KS))});var bT=Gh((one,_T)=>{"use strict";var If=Object.prototype.hasOwnProperty,yT=Object.prototype.toString,ET=Object.defineProperty,DT=Object.getOwnPropertyDescriptor,AT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):yT.call(t)==="[object Array]"},CT=function(t){if(!t||yT.call(t)!=="[object Object]")return!1;var n=If.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&If.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||If.call(t,i)},TT=function(t,n){ET&&n.name==="__proto__"?ET(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},xT=function(t,n){if(n==="__proto__")if(If.call(t,n)){if(DT)return DT(t,n).value}else return;return t[n]};_T.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=xT(o,n),i=xT(t,n),o!==i&&(c&&i&&(CT(i)||(u=AT(i)))?(u?(u=!1,s=r&&AT(r)?r:[]):s=r&&CT(r)?r:{},TT(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&TT(o,{name:n,newValue:i}));return o}});var JE="0.6.16";import{defaultLoaders as TS}from"cosmiconfig";function qh(e,t){let n=TS[".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 vS from"node:fs";import Ci from"node:path";import FS from"node:process";import xS from"node:process";import yS from"node:fs/promises";import{fileURLToPath as _S}from"node:url";import Gs from"node:path";var tD=e=>e instanceof URL?_S(e):e;async function cc(e,{cwd:t=xS.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 yS.stat(s);if(n==="file"&&o.isFile()||n==="directory"&&o.isDirectory())return s}catch{}i=Gs.dirname(i)}}async function nD({cwd:e=FS.cwd()}={}){return cc("package.json",{cwd:e})}import kS,{promises as SS}from"fs";async function zh(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return(await SS[e](n))[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}function $h(e,t,n){if(typeof n!="string")throw new TypeError(`Expected a string, got ${typeof n}`);try{return kS[e](n)[t]()}catch(r){if(r.code==="ENOENT")return!1;throw r}}var qs=zh.bind(null,"stat","isFile"),AY=zh.bind(null,"stat","isDirectory"),CY=zh.bind(null,"lstat","isSymbolicLink"),Vh=$h.bind(null,"statSync","isFile"),TY=$h.bind(null,"statSync","isDirectory"),xY=$h.bind(null,"lstatSync","isSymbolicLink");import IS from"node:os";var rD=IS.homedir();function Wh(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return rD?e.replace(/^~(?=$|\/|\\)/,rD):e}function OS(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?`-${OS(u+1,e.length+1)}`:"",a=BS(s,t,n,r,o);i.push(a)}return i}function BS(e,t,n,r,i=""){let u=iD(e),s=t?iD(t):void 0;if(!Vh(u))throw new Error(`Input file not found: "${u}"`);if(s){if(Vh(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);vS.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 Wh(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),wS=Object.keys(St.color),NS=Object.keys(St.bgColor),wY=[...wS,...NS];function RS(){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 LS=RS(),wr=LS;import Yh from"node:process";import PS from"node:os";import lD from"node:tty";function mr(e,t=globalThis.Deno?globalThis.Deno.args:Yh.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}=Yh,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 MS(){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 US(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function HS(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=MS();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(Yh.platform==="win32"){let s=PS.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=HS(e,{streamIsTTY:e&&e.isTTY,...t});return US(n)}var jS={stdout:cD({isTTY:lD.isatty(1)}),stderr:cD({isTTY:lD.isatty(2)})},fD=jS;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,Kh=Symbol("GENERATOR"),zs=Symbol("STYLER"),ha=Symbol("IS_EMPTY"),gD=["ansi","ansi","ansi256","ansi16m"],$s=Object.create(null),GS=(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 qS=e=>{let t=(...n)=>n.join(" ");return GS(t,e),Object.setPrototypeOf(t,pa.prototype),t};function pa(e){return qS(e)}Object.setPrototypeOf(pa.prototype,Function.prototype);for(let[e,t]of Object.entries(wr))$s[e]={get(){let n=pc(this,Qh(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 Zh=(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"?Zh("rgb",t,n,...wr.hexToRgb(...r)):wr[n][e](...r),zS=["rgb","hex","ansi256"];for(let e of zS){$s[e]={get(){let{level:n}=this;return function(...r){let i=Qh(Zh(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=Qh(Zh(e,gD[n],"bgColor",...r),wr.bgColor.close,this[zs]);return pc(this,i,this[ha])}}}}var $S=Object.defineProperties(()=>{},{...$s,level:{enumerable:!0,get(){return this[Kh].level},set(e){this[Kh].level=e}}}),Qh=(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)=>VS(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,$S),r[Kh]=e,r[zs]=t,r[ha]=n,r},VS=(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(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
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": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"vitest": "^1.6.0",
|
|
80
80
|
"yargs": "^17.7.2",
|
|
81
81
|
"zod": "^3.23.8",
|
|
82
|
-
"remark-mdat": "0.6.
|
|
82
|
+
"remark-mdat": "0.6.16"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public"
|