@tsmodule/tsmodule 40.9.0 → 40.11.0
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/dist/bin.js +26 -26
- package/dist/commands/build/index.js +15 -15
- package/dist/commands/build/lib/emitTsDeclarations.js +1 -1
- package/dist/commands/dev/index.js +16 -16
- package/dist/commands/index.js +16 -16
- package/dist/commands/normalize/index.js +7 -7
- package/dist/commands/normalize/lib/typescriptApi.js +5 -5
- package/dist/index.js +16 -16
- package/dist/types/index.js +16 -16
- package/package.json +1 -1
@@ -15,4 +15,4 @@ var H={NODE_ENV:"production"};try{let{env:r}=await import("process");r.NODE_ENV&
|
|
15
15
|
`,n)}while(o!==-1);return l+=r.slice(n),l}var{stdout:me,stderr:be}=De,V=Symbol("GENERATOR"),y=Symbol("STYLER"),N=Symbol("IS_EMPTY"),he=["ansi","ansi","ansi256","ansi16m"],x=Object.create(null),Ue=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=me?me.level:0;r.level=e.level===void 0?t:e.level},We=r=>{let e=(...t)=>t.join(" ");return Ue(e,r),Object.setPrototypeOf(e,M.prototype),e};function M(r){return We(r)}Object.setPrototypeOf(M.prototype,Function.prototype);for(let[r,e]of Object.entries(h))x[r]={get(){let t=j(this,W(e.open,e.close,this[y]),this[N]);return Object.defineProperty(this,r,{value:t}),t}};x.visible={get(){let r=j(this,this[y],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var U=(r,e,t,...o)=>r==="rgb"?e==="ansi16m"?h[t].ansi16m(...o):e==="ansi256"?h[t].ansi256(h.rgbToAnsi256(...o)):h[t].ansi(h.rgbToAnsi(...o)):r==="hex"?U("rgb",e,t,...h.hexToRgb(...o)):h[t][r](...o),Ke=["rgb","hex","ansi256"];for(let r of Ke){x[r]={get(){let{level:t}=this;return function(...o){let n=W(U(r,he[t],"color",...o),h.color.close,this[y]);return j(this,n,this[N])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);x[e]={get(){let{level:t}=this;return function(...o){let n=W(U(r,he[t],"bgColor",...o),h.bgColor.close,this[y]);return j(this,n,this[N])}}}}var qe=Object.defineProperties(()=>{},{...x,level:{enumerable:!0,get(){return this[V].level},set(r){this[V].level=r}}}),W=(r,e,t)=>{let o,n;return t===void 0?(o=r,n=e):(o=t.openAll+r,n=e+t.closeAll),{open:r,close:e,openAll:o,closeAll:n,parent:t}},j=(r,e,t)=>{let o=(...n)=>Je(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,qe),o[V]=r,o[y]=e,o[N]=t,o},Je=(r,e)=>{if(r.level<=0||!e)return r[N]?"":e;let t=r[y];if(t===void 0)return e;let{openAll:o,closeAll:n}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=Ye(e,t.close,t.open),t=t.parent;let l=e.indexOf(`
|
16
16
|
`);return l!==-1&&(e=Ve(e,n,o,l)),o+e+n};Object.defineProperties(M.prototype,x);var He=M(),Lr=M({level:be?be.level:0}),Qe=He,ze={win32:r=>({cmd:"cmd.exe",args:["/d","/s","/c",r]})},Xe={"cp -rf":{win32:r=>{let e="xcopy /E /S /G /Q /Y",t=r.map(o=>o.endsWith("\\")?o:`${o}\\`).map(o=>o.replace(/\*\\$/,""));return`${e} ${t.join(" ")}`}},ln:{win32:r=>`mklink /D ${r.join(" ")}`},pkill:{win32:r=>`taskkill /T /F /pid ${r.join(" ")}`}},Ze=(r,e,t)=>{let o={...ze,...e},n={...Xe,...t},l=u=>{let p=process.platform,b=o[p];if(b)return b(u);let[T,...E]=u.split(" ");return{cmd:T,args:E}},i=(u=>{let p=Object.entries(n);for(let[b,T]of p)if(u.startsWith(b)){let E=process.platform,C=T[E];if(!C)break;let d=u.slice(b.length).trim().split(" ");return C(d)}return u})(r);return l(i)},er=process.platform==="linux"||process.platform==="darwin",K=process.platform==="win32",rr={stdio:"pipe",shell:!0,detached:!K,env:process.env},tr={log:!0,commandTranslations:{},shellTranslations:{},...rr},de=({log:r=!0,commandTranslations:e={},shellTranslations:t={},...o}=tr)=>{let n=null;return{childProcess:n,async run(l){if(n)throw new Error("Only one command per shell.");if(typeof l=="object"){let p=process.platform;l.posix&&er&&(p="posix");let b=l[p];if(!b)throw new Error("No command found for platform: "+JSON.stringify({platform:process.platform,command:l}));l=b}let{cmd:i,args:u}=Ze(l,t,e);return r&&console.log(Qe.dim(`
|
17
17
|
$ ${i} ${u.join(" ")}
|
18
|
-
`)),await new Promise((p,b)=>{n=_e(i,u,o);let T="",E="";if(!n)throw new Error("Child process was not set.");let C=d=>{n=null;let J={code:d,stdout:T,stderr:E};d===0||d===1&&!K?p(J):b(J)};n.stdout?.on("data",d=>{T+=d.toString()}),n.stderr?.on("data",d=>{E+=d.toString()}),n.on("close",C),n.on("exit",C),n.on("error",C),n.stdout?.pipe(process.stdout),n.stderr?.pipe(process.stderr)})},kill(l="SIGKILL"){if(n?.pid)if(K)Se(`taskkill /t /f /pid ${n.pid}`);else return process.kill(-n.pid,l);return!0}}};var or={moduleResolution:"Node",module:"ESNext",target:"ESNext",esModuleInterop:!0,incremental:!1,rootDir:"src",outDir:"dist",declaration:!0,noEmit:!1,emitDeclarationOnly:!0},nr=async()=>{let r=Y(nr),e=de({log:!1}),o=`
|
18
|
+
`)),await new Promise((p,b)=>{n=_e(i,u,o);let T="",E="";if(!n)throw new Error("Child process was not set.");let C=d=>{n=null;let J={code:d,stdout:T,stderr:E};d===0||d===1&&!K?p(J):b(J)};n.stdout?.on("data",d=>{T+=d.toString()}),n.stderr?.on("data",d=>{E+=d.toString()}),n.on("close",C),n.on("exit",C),n.on("error",C),n.stdout?.pipe(process.stdout),n.stderr?.pipe(process.stderr)})},kill(l="SIGKILL"){if(n?.pid)if(K)Se(`taskkill /t /f /pid ${n.pid}`);else return process.kill(-n.pid,l);return!0}}};var or={moduleResolution:"Node",module:"ESNext",target:"ESNext",esModuleInterop:!0,incremental:!1,rootDir:"src",outDir:"dist",declaration:!0,noEmit:!1,emitDeclarationOnly:!0},nr=async()=>{let r=Y(nr),e=de({log:!1}),o=`yarn tsc -p tsconfig.json ${Object.entries(or).map(([n,l])=>`--${n} ${l}`).join(" ")}`;r.log(`Calling: ${o}`),await e.run(o)};export{or as D_TS_CONFIG,nr as emitTsDeclarations};
|