@tsmodule/tsmodule 40.0.11 → 40.0.12

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.
@@ -1,4 +1,4 @@
1
- "use strict";
1
+
2
2
  typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
3
3
 
4
4
  import{spawn as G,execSync as Y}from"child_process";import A from"node:process";import V from"node:os";import I from"node:tty";await(async()=>{let{dirname:r}=await import("path"),{fileURLToPath:e}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=e(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=r(globalThis.__filename)),typeof globalThis.require>"u"){let{default:t}=await import("module");globalThis.require=t.createRequire(import.meta.url)}})();var M=(r=0)=>e=>`\x1B[${e+r}m`,_=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,j=(r=0)=>(e,t,o)=>`\x1B[${38+r};2;${e};${t};${o}m`;function F(){let r=new Map,e={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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,o]of Object.entries(e)){for(let[l,i]of Object.entries(o))e[l]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},o[l]=e[l],r.set(i[0],i[1]);Object.defineProperty(e,t,{value:o,enumerable:!1})}return Object.defineProperty(e,"codes",{value:r,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=M(),e.color.ansi256=_(),e.color.ansi16m=j(),e.bgColor.ansi=M(10),e.bgColor.ansi256=_(10),e.bgColor.ansi16m=j(10),Object.defineProperties(e,{rgbToAnsi256:{value:(t,o,l)=>t===o&&o===l?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(l/255*5),enumerable:!1},hexToRgb:{value:t=>{let o=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!o)return[0,0,0];let{colorString:l}=o.groups;l.length===3&&(l=[...l].map(n=>n+n).join(""));let i=Number.parseInt(l,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let o,l,i;if(t>=232)o=((t-232)*10+8)/255,l=o,i=o;else{t-=16;let u=t%36;o=Math.floor(t/36)/5,l=Math.floor(u/6)/5,i=u%6/5}let n=Math.max(o,l,i)*2;if(n===0)return 30;let a=30+(Math.round(i)<<2|Math.round(l)<<1|Math.round(o));return n===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,o,l)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,o,l)),enumerable:!1},hexToAnsi:{value:t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),enumerable:!1}}),e}var U=F(),p=U;function c(r,e=A.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",o=e.indexOf(t+r),l=e.indexOf("--");return o!==-1&&(l===-1||o<l)}var{env:s}=A,R;c("no-color")||c("no-colors")||c("color=false")||c("color=never")?R=0:(c("color")||c("colors")||c("color=true")||c("color=always"))&&(R=1);function W(){if("FORCE_COLOR"in s)return s.FORCE_COLOR==="true"?1:s.FORCE_COLOR==="false"?0:s.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(s.FORCE_COLOR,10),3)}function D(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function J(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let o=W();o!==void 0&&(R=o);let l=t?R:o;if(l===0)return 0;if(t){if(c("color=16m")||c("color=full")||c("color=truecolor"))return 3;if(c("color=256"))return 2}if(r&&!e&&l===void 0)return 0;let i=l||0;if(s.TERM==="dumb")return i;if(A.platform==="win32"){let n=V.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in s)||s.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in s&&"AGENT_NAME"in s)return 1;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let n=Number.parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:i}function P(r,e={}){let t=J(r,{streamIsTTY:r&&r.isTTY,...e});return D(t)}var K={stdout:P({isTTY:I.isatty(1)}),stderr:P({isTTY:I.isatty(2)})},q=K;function H(r,e,t){let o=r.indexOf(e);if(o===-1)return r;let l=e.length,i=0,n="";do n+=r.substr(i,o-i)+e+t,i=o+l,o=r.indexOf(e,i);while(o!==-1);return n+=r.slice(i),n}function Q(r,e,t,o){let l=0,i="";do{let n=r[o-1]==="\r";i+=r.substr(l,(n?o-1:o)-l)+e+(n?`\r