2 lines
1.2 KiB
JavaScript
2 lines
1.2 KiB
JavaScript
var u=Object.defineProperty;var p=(e,s)=>u(e,"name",{value:s,configurable:!0});import O from"node:path";import{t as b}from"./temporary-directory-Du7LpLp9.mjs";const g=process.platform==="win32",m=p(e=>{const s=O.join(b,`${e}.pipe`);return g?`\\\\?\\pipe\\${s}`:s},"getPipePath");let n=!0;const l=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let r=0;if(l.process&&l.process.env&&l.process.stdout){const{FORCE_COLOR:e,NODE_DISABLE_COLORS:s,NO_COLOR:a,TERM:t,COLORTERM:i}=l.process.env;s||a||e==="0"?n=!1:e==="1"||e==="2"||e==="3"?n=!0:t==="dumb"?n=!1:"CI"in l.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(c=>c in l.process.env)?n=!0:n=process.stdout.isTTY,n&&(process.platform==="win32"||i&&(i==="truecolor"||i==="24bit")?r=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?r=2:r=1)}let f={enabled:n,supportLevel:r};function o(e,s,a=1){const t=`\x1B[${e}m`,i=`\x1B[${s}m`,c=new RegExp(`\\x1b\\[${s}m`,"g");return d=>f.enabled&&f.supportLevel>=a?t+(""+d).replace(c,t)+i:""+d}p(o,"kolorist");const C=o(30,39),R=o(33,39),I=o(90,39),L=o(92,39),w=o(95,39),E=o(96,39),h=o(44,49),T=o(100,49),y=o(103,49);export{C as a,y as b,h as c,T as d,I as e,w as f,m as g,L as h,g as i,E as l,f as o,R as y};
|