@visulima/ansi 1.0.6 → 1.0.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,37 @@
1
+ ## @visulima/ansi [1.0.8](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.7...@visulima/ansi@1.0.8) (2024-10-05)
2
+
3
+ ### Bug Fixes
4
+
5
+ * updated dev dependencies, updated packem to v1.0.7, fixed naming of some lint config files ([c071a9c](https://github.com/visulima/visulima/commit/c071a9c8e129014a962ff654a16f302ca18a5c67))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * updated dev dependencies ([736c6ce](https://github.com/visulima/visulima/commit/736c6ce7270b3e525a8ea9f79646a2a3fde47d4e))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * **@visulima/colorize:** upgraded to 1.4.11
15
+ * **@visulima/path:** upgraded to 1.1.0
16
+
17
+ ## @visulima/ansi [1.0.7](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.6...@visulima/ansi@1.0.7) (2024-09-24)
18
+
19
+ ### Bug Fixes
20
+
21
+ * update packem to v1 ([05f3bc9](https://github.com/visulima/visulima/commit/05f3bc960df10a1602e24f9066e2b0117951a877))
22
+ * updated esbuild from v0.23 to v0.24 ([3793010](https://github.com/visulima/visulima/commit/3793010d0d549c0d41f85dea04b8436251be5fe8))
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * clean up ([0c6a87d](https://github.com/visulima/visulima/commit/0c6a87dd9e1f2e755f929c6360b51e3fe377c095))
27
+ * updated dev dependencies ([05edb67](https://github.com/visulima/visulima/commit/05edb671285b1cc42875223314b24212e6a12588))
28
+
29
+
30
+ ### Dependencies
31
+
32
+ * **@visulima/colorize:** upgraded to 1.4.10
33
+ * **@visulima/path:** upgraded to 1.0.9
34
+
1
35
  ## @visulima/ansi [1.0.6](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.5...@visulima/ansi@1.0.6) (2024-09-11)
2
36
 
3
37
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -117,7 +117,7 @@ Repository: https://github.com/tapjs/signal-exit.git
117
117
  > WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
118
118
  > ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
119
119
 
120
- <!-- DEPENDENCIES -->
120
+ <!-- /DEPENDENCIES -->
121
121
 
122
122
  <!-- TYPE_DEPENDENCIES -->
123
123
 
@@ -148,4 +148,4 @@ License: (MIT OR CC0-1.0)
148
148
  By: Sindre Sorhus
149
149
  Repository: sindresorhus/type-fest
150
150
 
151
- <!-- TYPE_DEPENDENCIES -->
151
+ <!-- /TYPE_DEPENDENCIES -->
package/dist/clear.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/constants-1ozeAQ9B.cjs"),r=require("./erase.cjs"),c=require("./packem_shared/cursor-hFfOpZfK.cjs"),l=e.ESC+"1;1H"+e.ESC+"J",a=r.eraseLine+e.CSI+"0D",n=e.ESC+"H"+e.ESC+"2J",S=e.ESC+"2J",s=c.isWindows?r.eraseScreen+e.ESC+"0f":r.eraseScreen+e.ESC+"3J"+e.ESC+"H"+e.ESC+"c";exports.clearLine=a;exports.clearScreen=n;exports.clearScrollbar=S;exports.clearTerminal=s;exports.fullReset=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/constants-1ozeAQ9B.cjs"),r=require("./erase.cjs"),c=require("./packem_shared/cursor-MNIRCK8L.cjs"),l=e.ESC+"1;1H"+e.ESC+"J",a=r.eraseLine+e.CSI+"0D",n=e.ESC+"H"+e.ESC+"2J",S=e.ESC+"2J",s=c.isWindows?r.eraseScreen+e.ESC+"0f":r.eraseScreen+e.ESC+"3J"+e.ESC+"H"+e.ESC+"c";exports.clearLine=a;exports.clearScreen=n;exports.clearScrollbar=S;exports.clearTerminal=s;exports.fullReset=l;
package/dist/clear.mjs CHANGED
@@ -1 +1 @@
1
- import{E as e,C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{eraseLine as o,eraseScreen as r}from"./erase.mjs";import{n as c}from"./packem_shared/cursor-DnDlwQ-8.mjs";const n=e+"1;1H"+e+"J",m=o+a+"0D",t=e+"H"+e+"2J",f=e+"2J",S=c?r+e+"0f":r+e+"3J"+e+"H"+e+"c";export{m as clearLine,t as clearScreen,f as clearScrollbar,S as clearTerminal,n as fullReset};
1
+ import{E as e,C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{eraseLine as o,eraseScreen as r}from"./erase.mjs";import{n as c}from"./packem_shared/cursor-DQyuk1_w.mjs";const n=e+"1;1H"+e+"J",m=o+a+"0D",t=e+"H"+e+"2J",f=e+"2J",S=c?r+e+"0f":r+e+"3J"+e+"H"+e+"c";export{m as clearLine,t as clearScreen,f as clearScrollbar,S as clearTerminal,n as fullReset};
package/dist/cursor.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./packem_shared/constants-1ozeAQ9B.cjs");const r=require("./packem_shared/cursor-hFfOpZfK.cjs"),o=require("./packem_shared/restoreCursor-DCEhO8y7.cjs");exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.restoreCursor=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./packem_shared/constants-1ozeAQ9B.cjs");const r=require("./packem_shared/cursor-MNIRCK8L.cjs"),o=require("./packem_shared/restoreCursor-jXnrIbaL.cjs");exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.restoreCursor=o;
package/dist/cursor.mjs CHANGED
@@ -1 +1 @@
1
- import"./packem_shared/constants-DeW8ueso.mjs";import{c as a,a as e,b as u,d as c,e as t,f as i,g as d,h as f,i as m,j as p,k as w,l as n,m as v}from"./packem_shared/cursor-DnDlwQ-8.mjs";import{default as L}from"./packem_shared/restoreCursor-DPTYk7C7.mjs";export{a as cursorBackward,e as cursorDown,u as cursorForward,c as cursorHide,t as cursorLeft,i as cursorMove,d as cursorNextLine,f as cursorPreviousLine,m as cursorRestore,p as cursorSave,w as cursorShow,n as cursorTo,v as cursorUp,L as restoreCursor};
1
+ import"./packem_shared/constants-DeW8ueso.mjs";import{c as a,a as e,b as u,d as c,e as t,f as i,g as d,h as f,i as m,j as p,k as w,l as n,m as v}from"./packem_shared/cursor-DQyuk1_w.mjs";import{default as L}from"./packem_shared/restoreCursor-DzRQew_A.mjs";export{a as cursorBackward,e as cursorDown,u as cursorForward,c as cursorHide,t as cursorLeft,i as cursorMove,d as cursorNextLine,f as cursorPreviousLine,m as cursorRestore,p as cursorSave,w as cursorShow,n as cursorTo,v as cursorUp,L as restoreCursor};
package/dist/erase.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./packem_shared/constants-1ozeAQ9B.cjs"),o=require("./packem_shared/cursor-hFfOpZfK.cjs");var S=Object.defineProperty,n=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${s.CSI}J`.repeat(e),"eraseDown"),i=`${s.CSI}2K`,L=`${s.CSI}K`,p=`${s.CSI}1K`,l=n(e=>{let r="";for(let a=0;a<e;a++)r+=i+(a<e-1?o.cursorUp():"");return e&&(r+=o.cursorLeft),r},"eraseLines"),C=`${s.CSI}2J`,I=n((e=1)=>`${s.CSI}1J`.repeat(e),"eraseUp");exports.eraseDown=u;exports.eraseLine=i;exports.eraseLineEnd=L;exports.eraseLineStart=p;exports.eraseLines=l;exports.eraseScreen=C;exports.eraseUp=I;
1
+ "use strict";var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./packem_shared/constants-1ozeAQ9B.cjs"),o=require("./packem_shared/cursor-MNIRCK8L.cjs");var S=Object.defineProperty,n=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${s.CSI}J`.repeat(e),"eraseDown"),i=`${s.CSI}2K`,L=`${s.CSI}K`,p=`${s.CSI}1K`,l=n(e=>{let r="";for(let a=0;a<e;a++)r+=i+(a<e-1?o.cursorUp():"");return e&&(r+=o.cursorLeft),r},"eraseLines"),C=`${s.CSI}2J`,I=n((e=1)=>`${s.CSI}1J`.repeat(e),"eraseUp");exports.eraseDown=u;exports.eraseLine=i;exports.eraseLineEnd=L;exports.eraseLineStart=p;exports.eraseLines=l;exports.eraseScreen=C;exports.eraseUp=I;
package/dist/erase.mjs CHANGED
@@ -1 +1 @@
1
- var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{m as i,e as p}from"./packem_shared/cursor-DnDlwQ-8.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${a}J`.repeat(e),"eraseDown"),f=`${a}2K`,l=`${a}K`,v=`${a}1K`,J=n(e=>{let r="";for(let s=0;s<e;s++)r+=f+(s<e-1?i():"");return e&&(r+=p),r},"eraseLines"),K=`${a}2J`,S=n((e=1)=>`${a}1J`.repeat(e),"eraseUp");export{u as eraseDown,f as eraseLine,l as eraseLineEnd,v as eraseLineStart,J as eraseLines,K as eraseScreen,S as eraseUp};
1
+ var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{m as i,e as p}from"./packem_shared/cursor-DQyuk1_w.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${a}J`.repeat(e),"eraseDown"),f=`${a}2K`,l=`${a}K`,v=`${a}1K`,J=n(e=>{let r="";for(let s=0;s<e;s++)r+=f+(s<e-1?i():"");return e&&(r+=p),r},"eraseLines"),K=`${a}2J`,S=n((e=1)=>`${a}1J`.repeat(e),"eraseUp");export{u as eraseDown,f as eraseLine,l as eraseLineEnd,v as eraseLineStart,J as eraseLines,K as eraseScreen,S as eraseUp};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./alternative-screen.cjs"),s=require("./clear.cjs"),r=require("./packem_shared/cursor-hFfOpZfK.cjs"),e=require("./erase.cjs"),n=require("./image.cjs"),a=require("./link.cjs"),o=require("./scroll.cjs"),i=require("./strip.cjs"),t="\x07";exports.alternativeScreenEnter=c.alternativeScreenEnter;exports.alternativeScreenExit=c.alternativeScreenExit;exports.clearLine=s.clearLine;exports.clearScreen=s.clearScreen;exports.clearScrollbar=s.clearScrollbar;exports.clearTerminal=s.clearTerminal;exports.fullReset=s.fullReset;exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.eraseDown=e.eraseDown;exports.eraseLine=e.eraseLine;exports.eraseLineEnd=e.eraseLineEnd;exports.eraseLineStart=e.eraseLineStart;exports.eraseLines=e.eraseLines;exports.eraseScreen=e.eraseScreen;exports.eraseUp=e.eraseUp;exports.image=n;exports.link=a;exports.scrollDown=o.scrollDown;exports.scrollUp=o.scrollUp;exports.strip=i;exports.beep=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./alternative-screen.cjs"),s=require("./clear.cjs"),r=require("./packem_shared/cursor-MNIRCK8L.cjs"),e=require("./erase.cjs"),n=require("./image.cjs"),a=require("./link.cjs"),o=require("./scroll.cjs"),i=require("./strip.cjs"),t="\x07";exports.alternativeScreenEnter=c.alternativeScreenEnter;exports.alternativeScreenExit=c.alternativeScreenExit;exports.clearLine=s.clearLine;exports.clearScreen=s.clearScreen;exports.clearScrollbar=s.clearScrollbar;exports.clearTerminal=s.clearTerminal;exports.fullReset=s.fullReset;exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.eraseDown=e.eraseDown;exports.eraseLine=e.eraseLine;exports.eraseLineEnd=e.eraseLineEnd;exports.eraseLineStart=e.eraseLineStart;exports.eraseLines=e.eraseLines;exports.eraseScreen=e.eraseScreen;exports.eraseUp=e.eraseUp;exports.image=n;exports.link=a;exports.scrollDown=o.scrollDown;exports.scrollUp=o.scrollUp;exports.strip=i;exports.beep=t;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{alternativeScreenEnter as a,alternativeScreenExit as o}from"./alternative-screen.mjs";import{clearLine as t,clearScreen as n,clearScrollbar as l,clearTerminal as u,fullReset as i}from"./clear.mjs";import{c as p,a as x,b as m,d,e as L,f as S,g as w,h as v,i as b,j as k,k as D,l as E,m as U}from"./packem_shared/cursor-DnDlwQ-8.mjs";import{eraseDown as h,eraseLine as R,eraseLineEnd as T,eraseLineStart as j,eraseLines as B,eraseScreen as F,eraseUp as H}from"./erase.mjs";import{default as N}from"./image.mjs";import{default as q}from"./link.mjs";import{scrollDown as z,scrollUp as A}from"./scroll.mjs";import{default as G}from"./strip.mjs";const r="\x07";export{a as alternativeScreenEnter,o as alternativeScreenExit,r as beep,t as clearLine,n as clearScreen,l as clearScrollbar,u as clearTerminal,p as cursorBackward,x as cursorDown,m as cursorForward,d as cursorHide,L as cursorLeft,S as cursorMove,w as cursorNextLine,v as cursorPreviousLine,b as cursorRestore,k as cursorSave,D as cursorShow,E as cursorTo,U as cursorUp,h as eraseDown,R as eraseLine,T as eraseLineEnd,j as eraseLineStart,B as eraseLines,F as eraseScreen,H as eraseUp,i as fullReset,N as image,q as link,z as scrollDown,A as scrollUp,G as strip};
1
+ import{alternativeScreenEnter as a,alternativeScreenExit as o}from"./alternative-screen.mjs";import{clearLine as t,clearScreen as n,clearScrollbar as l,clearTerminal as u,fullReset as i}from"./clear.mjs";import{c as p,a as x,b as m,d,e as L,f as S,g as w,h as v,i as b,j as k,k as D,l as E,m as U}from"./packem_shared/cursor-DQyuk1_w.mjs";import{eraseDown as h,eraseLine as R,eraseLineEnd as T,eraseLineStart as j,eraseLines as B,eraseScreen as F,eraseUp as H}from"./erase.mjs";import{default as N}from"./image.mjs";import{default as q}from"./link.mjs";import{scrollDown as z,scrollUp as A}from"./scroll.mjs";import{default as G}from"./strip.mjs";const r="\x07";export{a as alternativeScreenEnter,o as alternativeScreenExit,r as beep,t as clearLine,n as clearScreen,l as clearScrollbar,u as clearTerminal,p as cursorBackward,x as cursorDown,m as cursorForward,d as cursorHide,L as cursorLeft,S as cursorMove,w as cursorNextLine,v as cursorPreviousLine,b as cursorRestore,k as cursorSave,D as cursorShow,E as cursorTo,U as cursorUp,h as eraseDown,R as eraseLine,T as eraseLineEnd,j as eraseLineStart,B as eraseLines,F as eraseScreen,H as eraseUp,i as fullReset,N as image,q as link,z as scrollDown,A as scrollUp,G as strip};
@@ -1 +1 @@
1
- var p=Object.defineProperty;var u=(r,o)=>p(r,"name",{value:o,configurable:!0});import{C as s,E as c,S as t}from"./constants-DeW8ueso.mjs";import"./restoreCursor-DPTYk7C7.mjs";const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",m=!i&&process.platform==="win32";var d=Object.defineProperty,e=u((r,o)=>d(r,"name",{value:o,configurable:!0}),"e");const f=e((r=1)=>s+r+"D","cursorBackward"),S=e((r=1)=>s+r+"B","cursorDown"),T=e((r=1)=>s+r+"C","cursorForward"),A=s+"?25l",C=s+"G",E=e((r,o)=>{let a="";return r<0?a+=s+-r+"D":r>0&&(a+=s+r+"C"),o<0?a+=s+-o+"A":o>0&&(a+=s+o+"B"),a},"cursorMove"),L=e((r=1)=>(s+"E").repeat(r),"cursorNextLine"),P=e((r=1)=>(s+"F").repeat(r),"cursorPreviousLine"),b=n?c+"8":c+"u",h=n?c+"7":c+"s",B=s+"?25h",D=e((r,o)=>!o&&o!==0?s+(r+1)+"G":s+(o+1)+t+(r+1)+"H","cursorTo"),M=e((r=1)=>s+r+"A","cursorUp");export{S as a,T as b,f as c,A as d,C as e,E as f,L as g,P as h,b as i,h as j,B as k,D as l,M as m,m as n};
1
+ var p=Object.defineProperty;var u=(r,o)=>p(r,"name",{value:o,configurable:!0});import{C as s,E as c,S as t}from"./constants-DeW8ueso.mjs";import"./restoreCursor-DzRQew_A.mjs";const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",m=!i&&process.platform==="win32";var d=Object.defineProperty,e=u((r,o)=>d(r,"name",{value:o,configurable:!0}),"e");const f=e((r=1)=>s+r+"D","cursorBackward"),S=e((r=1)=>s+r+"B","cursorDown"),T=e((r=1)=>s+r+"C","cursorForward"),A=s+"?25l",C=s+"G",E=e((r,o)=>{let a="";return r<0?a+=s+-r+"D":r>0&&(a+=s+r+"C"),o<0?a+=s+-o+"A":o>0&&(a+=s+o+"B"),a},"cursorMove"),L=e((r=1)=>(s+"E").repeat(r),"cursorNextLine"),P=e((r=1)=>(s+"F").repeat(r),"cursorPreviousLine"),b=n?c+"8":c+"u",h=n?c+"7":c+"s",B=s+"?25h",D=e((r,o)=>!o&&o!==0?s+(r+1)+"G":s+(o+1)+t+(r+1)+"H","cursorTo"),M=e((r=1)=>s+r+"A","cursorUp");export{S as a,T as b,f as c,A as d,C as e,E as f,L as g,P as h,b as i,h as j,B as k,D as l,M as m,m as n};
@@ -1 +1 @@
1
- "use strict";var S=Object.defineProperty;var u=(r,s)=>S(r,"name",{value:s,configurable:!0});const o=require("./constants-1ozeAQ9B.cjs");require("./restoreCursor-DCEhO8y7.cjs");const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",a=!i&&process.platform==="win32";var C=Object.defineProperty,e=u((r,s)=>C(r,"name",{value:s,configurable:!0}),"e");const t=e((r=1)=>o.CSI+r+"D","cursorBackward"),w=e((r=1)=>o.CSI+r+"B","cursorDown"),I=e((r=1)=>o.CSI+r+"C","cursorForward"),d=o.CSI+"?25l",p=o.CSI+"G",v=e((r,s)=>{let c="";return r<0?c+=o.CSI+-r+"D":r>0&&(c+=o.CSI+r+"C"),s<0?c+=o.CSI+-s+"A":s>0&&(c+=o.CSI+s+"B"),c},"cursorMove"),l=e((r=1)=>(o.CSI+"E").repeat(r),"cursorNextLine"),L=e((r=1)=>(o.CSI+"F").repeat(r),"cursorPreviousLine"),E=n?o.ESC+"8":o.ESC+"u",T=n?o.ESC+"7":o.ESC+"s",P=o.CSI+"?25h",f=e((r,s)=>!s&&s!==0?o.CSI+(r+1)+"G":o.CSI+(s+1)+o.SEP+(r+1)+"H","cursorTo"),m=e((r=1)=>o.CSI+r+"A","cursorUp");exports.cursorBackward=t;exports.cursorDown=w;exports.cursorForward=I;exports.cursorHide=d;exports.cursorLeft=p;exports.cursorMove=v;exports.cursorNextLine=l;exports.cursorPreviousLine=L;exports.cursorRestore=E;exports.cursorSave=T;exports.cursorShow=P;exports.cursorTo=f;exports.cursorUp=m;exports.isWindows=a;
1
+ "use strict";var S=Object.defineProperty;var u=(r,s)=>S(r,"name",{value:s,configurable:!0});const o=require("./constants-1ozeAQ9B.cjs");require("./restoreCursor-jXnrIbaL.cjs");const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",a=!i&&process.platform==="win32";var C=Object.defineProperty,e=u((r,s)=>C(r,"name",{value:s,configurable:!0}),"e");const t=e((r=1)=>o.CSI+r+"D","cursorBackward"),w=e((r=1)=>o.CSI+r+"B","cursorDown"),I=e((r=1)=>o.CSI+r+"C","cursorForward"),d=o.CSI+"?25l",p=o.CSI+"G",v=e((r,s)=>{let c="";return r<0?c+=o.CSI+-r+"D":r>0&&(c+=o.CSI+r+"C"),s<0?c+=o.CSI+-s+"A":s>0&&(c+=o.CSI+s+"B"),c},"cursorMove"),l=e((r=1)=>(o.CSI+"E").repeat(r),"cursorNextLine"),L=e((r=1)=>(o.CSI+"F").repeat(r),"cursorPreviousLine"),E=n?o.ESC+"8":o.ESC+"u",T=n?o.ESC+"7":o.ESC+"s",P=o.CSI+"?25h",f=e((r,s)=>!s&&s!==0?o.CSI+(r+1)+"G":o.CSI+(s+1)+o.SEP+(r+1)+"H","cursorTo"),m=e((r=1)=>o.CSI+r+"A","cursorUp");exports.cursorBackward=t;exports.cursorDown=w;exports.cursorForward=I;exports.cursorHide=d;exports.cursorLeft=p;exports.cursorMove=v;exports.cursorNextLine=l;exports.cursorPreviousLine=L;exports.cursorRestore=E;exports.cursorSave=T;exports.cursorShow=P;exports.cursorTo=f;exports.cursorUp=m;exports.isWindows=a;
@@ -0,0 +1,2 @@
1
+ var b=Object.defineProperty;var o=(e,t)=>b(e,"name",{value:t,configurable:!0});import c from"node:process";const S=o((e,t,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(e,i),s=Object.getOwnPropertyDescriptor(t,i);!w(r,s)&&n||Object.defineProperty(e,i,s)},"copyProperty"),w=o(function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},"canCopyProperty"),E=o((e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)},"changePrototype"),I=o((e,t)=>`/* Wrapped ${e}*/
2
+ ${t}`,"wrappedToString"),O=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),P=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),T=o((e,t,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=I.bind(null,n,t.toString());Object.defineProperty(r,"name",P);const{writable:s,enumerable:a,configurable:h}=O;Object.defineProperty(e,"toString",{value:r,writable:s,enumerable:a,configurable:h})},"changeToString");function G(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:n}=e;for(const r of Reflect.ownKeys(t))S(e,t,r,i);return E(e,t),T(e,t,n),e}o(G,"mimicFunction");const f=new WeakMap,x=o((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,n=0;const r=e.displayName||e.name||"<anonymous>",s=o(function(...a){if(f.set(s,++n),n===1)i=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return G(s,e),f.set(s,n),s},"onetime");x.callCount=e=>{if(!f.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return f.get(e)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=o(e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),m=globalThis,j=Object.defineProperty.bind(Object);class L{static{o(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(m[d])return m[d];j(m,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,i){this.listeners[t].push(i)}removeListener(t,i){const n=this.listeners[t],r=n.indexOf(i);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,i,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const s of this.listeners[t])r=s(i,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class y{static{o(this,"SignalExitBase")}}const _=o(e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class C extends y{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class R extends y{static{o(this,"SignalExit")}#o=p.platform==="win32"?"SIGINT":"SIGHUP";#e=new L;#t;#r;#s;#n={};#i=!1;constructor(t){super(),this.#t=t,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||t.kill(t.pid,h)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,t),()=>{this.#e.removeListener(n,t),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const t of l)try{const i=this.#n[t];i&&this.#t.on(t,i)}catch{}this.#t.emit=(t,...i)=>this.#a(t,...i),this.#t.reallyExit=t=>this.#l(t)}}unload(){this.#i&&(this.#i=!1,l.forEach(t=>{const i=this.#n[t];if(!i)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,i)}catch{}}),this.#t.emit=this.#r,this.#t.reallyExit=this.#s,this.#e.count-=1)}#l(t){return u(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#s.call(this.#t,this.#t.exitCode)):0}#a(t,...i){const n=this.#r;if(t==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=n.call(this.#t,t,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return n.call(this.#t,t,...i)}}const p=globalThis.process,{onExit:F,load:N,unload:U}=_(u(p)?new R(p):new C),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,v=g?x(()=>{F(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{v as default};
@@ -0,0 +1,2 @@
1
+ "use strict";var b=Object.defineProperty;var r=(t,e)=>b(t,"name",{value:e,configurable:!0});const S=require("node:process"),w=r(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),c=w(S),E=r((t,e,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const s=Object.getOwnPropertyDescriptor(t,i),o=Object.getOwnPropertyDescriptor(e,i);!I(s,o)&&n||Object.defineProperty(t,i,o)},"copyProperty"),I=r(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),O=r((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},"changePrototype"),P=r((t,e)=>`/* Wrapped ${t}*/
2
+ ${e}`,"wrappedToString"),T=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),G=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),j=r((t,e,i)=>{const n=i===""?"":`with ${i.trim()}() `,s=P.bind(null,n,e.toString());Object.defineProperty(s,"name",G);const{writable:o,enumerable:a,configurable:h}=T;Object.defineProperty(t,"toString",{value:s,writable:o,enumerable:a,configurable:h})},"changeToString");function _(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:n}=t;for(const s of Reflect.ownKeys(e))E(t,e,s,i);return O(t,e),j(t,e,n),t}r(_,"mimicFunction");const f=new WeakMap,y=r((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,n=0;const s=t.displayName||t.name||"<anonymous>",o=r(function(...a){if(f.set(o,++n),n===1)i=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return i},"onetime");return _(o,t),f.set(o,n),o},"onetime");y.callCount=t=>{if(!f.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return f.get(t)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=r(t=>!!t&&!0&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),p=globalThis,L=Object.defineProperty.bind(Object);class C{static{r(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(p[d])return p[d];L(p,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,i){this.listeners[e].push(i)}removeListener(e,i){const n=this.listeners[e],s=n.indexOf(i);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(e,i,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(const o of this.listeners[e])s=o(i,n)===!0||s;return e==="exit"&&(s=this.emit("afterExit",i,n)||s),s}}class x{static{r(this,"SignalExitBase")}}const R=r(t=>({onExit(e,i){return t.onExit(e,i)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class F extends x{static{r(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class k extends x{static{r(this,"SignalExit")}#o=m.platform==="win32"?"SIGINT":"SIGHUP";#e=new C;#t;#s;#r;#n={};#i=!1;constructor(e){super(),this.#t=e,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:s}=this.#e;const o=e;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||e.kill(e.pid,h)}};this.#r=e.reallyExit,this.#s=e.emit}onExit(e,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,e),()=>{this.#e.removeListener(n,e),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const e of l)try{const i=this.#n[e];i&&this.#t.on(e,i)}catch{}this.#t.emit=(e,...i)=>this.#a(e,...i),this.#t.reallyExit=e=>this.#l(e)}}unload(){this.#i&&(this.#i=!1,l.forEach(e=>{const i=this.#n[e];if(!i)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,i)}catch{}}),this.#t.emit=this.#s,this.#t.reallyExit=this.#r,this.#e.count-=1)}#l(e){return u(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#r.call(this.#t,this.#t.exitCode)):0}#a(e,...i){const n=this.#s;if(e==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const s=n.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),s}else return n.call(this.#t,e,...i)}}const m=globalThis.process,{onExit:$,load:v,unload:M}=R(u(m)?new k(m):new F),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,N=g?y(()=>{$(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};module.exports=N;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/ansi",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "ANSI escape codes for some terminal swag.",
5
5
  "keywords": [
6
6
  "alternative-screen",
@@ -202,21 +202,21 @@
202
202
  "@anolilab/prettier-config": "^5.0.14",
203
203
  "@anolilab/semantic-release-pnpm": "1.1.3",
204
204
  "@anolilab/semantic-release-preset": "^9.0.0",
205
- "@arethetypeswrong/cli": "^0.16.2",
206
- "@babel/core": "^7.25.2",
207
- "@rushstack/eslint-plugin-security": "^0.8.2",
208
- "@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
205
+ "@arethetypeswrong/cli": "^0.16.4",
206
+ "@babel/core": "^7.25.7",
207
+ "@rushstack/eslint-plugin-security": "^0.8.3",
208
+ "@secretlint/secretlint-rule-preset-recommend": "^8.3.0",
209
209
  "@total-typescript/ts-reset": "^0.6.1",
210
210
  "@types/node": "20.14.6",
211
- "@visulima/colorize": "1.4.9",
212
- "@visulima/packem": "^1.0.0-alpha.108",
213
- "@visulima/path": "1.0.8",
214
- "@vitest/coverage-v8": "^2.0.5",
215
- "@vitest/ui": "^2.0.5",
211
+ "@visulima/colorize": "1.4.11",
212
+ "@visulima/packem": "1.0.7",
213
+ "@visulima/path": "1.1.0",
214
+ "@vitest/coverage-v8": "^2.1.2",
215
+ "@vitest/ui": "^2.1.2",
216
216
  "ansi-regex": "^6.1.0",
217
217
  "conventional-changelog-conventionalcommits": "8.0.0",
218
218
  "cross-env": "^7.0.3",
219
- "esbuild": "0.23.0",
219
+ "esbuild": "0.24.0",
220
220
  "eslint": "8.57.0",
221
221
  "eslint-plugin-deprecation": "^3.0.0",
222
222
  "eslint-plugin-etc": "^2.0.3",
@@ -228,10 +228,10 @@
228
228
  "restore-cursor": "^5.1.0",
229
229
  "rimraf": "5.0.9",
230
230
  "secretlint": "8.2.4",
231
- "semantic-release": "^24.1.1",
231
+ "semantic-release": "^24.1.2",
232
232
  "type-fest": "^4.26.1",
233
233
  "typescript": "5.4.5",
234
- "vitest": "^2.0.5"
234
+ "vitest": "^2.1.2"
235
235
  },
236
236
  "engines": {
237
237
  "node": ">=18.* <=22.*"
@@ -1,2 +0,0 @@
1
- "use strict";var b=Object.defineProperty;var s=(t,e)=>b(t,"name",{value:e,configurable:!0});const S=require("node:process"),w=s(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),c=w(S),E=s((t,e,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(t,i),o=Object.getOwnPropertyDescriptor(e,i);!I(r,o)&&n||Object.defineProperty(t,i,o)},"copyProperty"),I=s(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),O=s((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},"changePrototype"),P=s((t,e)=>`/* Wrapped ${t}*/
2
- ${e}`,"wrappedToString"),T=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),G=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),j=s((t,e,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=P.bind(null,n,e.toString());Object.defineProperty(r,"name",G);const{writable:o,enumerable:a,configurable:h}=T;Object.defineProperty(t,"toString",{value:r,writable:o,enumerable:a,configurable:h})},"changeToString");function _(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:n}=t;for(const r of Reflect.ownKeys(e))E(t,e,r,i);return O(t,e),j(t,e,n),t}s(_,"mimicFunction");const f=new WeakMap,g=s((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,n=0;const r=t.displayName||t.name||"<anonymous>",o=s(function(...a){if(f.set(o,++n),n===1)i=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return _(o,t),f.set(o,n),o},"onetime");g.callCount=t=>{if(!f.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return f.get(t)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=s(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),p=globalThis,L=Object.defineProperty.bind(Object);class C{static{s(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(p[d])return p[d];L(p,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,i){this.listeners[e].push(i)}removeListener(e,i){const n=this.listeners[e],r=n.indexOf(i);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,i,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const o of this.listeners[e])r=o(i,n)===!0||r;return e==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class x{static{s(this,"SignalExitBase")}}const R=s(t=>({onExit(e,i){return t.onExit(e,i)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class F extends x{static{s(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class k extends x{static{s(this,"SignalExit")}#o=m.platform==="win32"?"SIGINT":"SIGHUP";#e=new C;#t;#r;#s;#n={};#i=!1;constructor(e){super(),this.#t=e,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const o=e;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),n.length===r){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||e.kill(e.pid,h)}};this.#s=e.reallyExit,this.#r=e.emit}onExit(e,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,e),()=>{this.#e.removeListener(n,e),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const e of l)try{const i=this.#n[e];i&&this.#t.on(e,i)}catch{}this.#t.emit=(e,...i)=>this.#a(e,...i),this.#t.reallyExit=e=>this.#l(e)}}unload(){this.#i&&(this.#i=!1,l.forEach(e=>{const i=this.#n[e];if(!i)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,i)}catch{}}),this.#t.emit=this.#r,this.#t.reallyExit=this.#s,this.#e.count-=1)}#l(e){return u(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#s.call(this.#t,this.#t.exitCode)):0}#a(e,...i){const n=this.#r;if(e==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=n.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return n.call(this.#t,e,...i)}}const m=globalThis.process,{onExit:$,load:v,unload:M}=R(u(m)?new k(m):new F),y=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,N=y?g(()=>{$(()=>{y.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};module.exports=N;
@@ -1,2 +0,0 @@
1
- var b=Object.defineProperty;var o=(e,t)=>b(e,"name",{value:t,configurable:!0});import c from"node:process";const S=o((e,t,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(e,i),s=Object.getOwnPropertyDescriptor(t,i);!w(r,s)&&n||Object.defineProperty(e,i,s)},"copyProperty"),w=o(function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},"canCopyProperty"),E=o((e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)},"changePrototype"),I=o((e,t)=>`/* Wrapped ${e}*/
2
- ${t}`,"wrappedToString"),O=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),P=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),T=o((e,t,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=I.bind(null,n,t.toString());Object.defineProperty(r,"name",P);const{writable:s,enumerable:a,configurable:h}=O;Object.defineProperty(e,"toString",{value:r,writable:s,enumerable:a,configurable:h})},"changeToString");function G(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:n}=e;for(const r of Reflect.ownKeys(t))S(e,t,r,i);return E(e,t),T(e,t,n),e}o(G,"mimicFunction");const f=new WeakMap,y=o((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,n=0;const r=e.displayName||e.name||"<anonymous>",s=o(function(...a){if(f.set(s,++n),n===1)i=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return G(s,e),f.set(s,n),s},"onetime");y.callCount=e=>{if(!f.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return f.get(e)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=o(e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),m=globalThis,j=Object.defineProperty.bind(Object);class L{static{o(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(m[d])return m[d];j(m,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,i){this.listeners[t].push(i)}removeListener(t,i){const n=this.listeners[t],r=n.indexOf(i);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,i,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const s of this.listeners[t])r=s(i,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class x{static{o(this,"SignalExitBase")}}const _=o(e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class C extends x{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class R extends x{static{o(this,"SignalExit")}#o=p.platform==="win32"?"SIGINT":"SIGHUP";#e=new L;#t;#r;#s;#n={};#i=!1;constructor(t){super(),this.#t=t,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||t.kill(t.pid,h)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,t),()=>{this.#e.removeListener(n,t),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const t of l)try{const i=this.#n[t];i&&this.#t.on(t,i)}catch{}this.#t.emit=(t,...i)=>this.#a(t,...i),this.#t.reallyExit=t=>this.#l(t)}}unload(){this.#i&&(this.#i=!1,l.forEach(t=>{const i=this.#n[t];if(!i)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,i)}catch{}}),this.#t.emit=this.#r,this.#t.reallyExit=this.#s,this.#e.count-=1)}#l(t){return u(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#s.call(this.#t,this.#t.exitCode)):0}#a(t,...i){const n=this.#r;if(t==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=n.call(this.#t,t,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return n.call(this.#t,t,...i)}}const p=globalThis.process,{onExit:F,load:N,unload:U}=_(u(p)?new R(p):new C),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,v=g?y(()=>{F(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{v as default};