@moneko/core 3.21.0 → 3.21.1

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 +1 @@
1
- import{cursorTo as t,clearScreenDown as o}from"readline";import{relative as s}from"path";import e from"chalk";import r from"../paths.mjs";import{isDev as i}from"../process-env.mjs";import{analyzeBundleSize as p}from"@moneko/utils";let{blue:c,bgBlue:u,grey:d,green:n,yellow:l,red:m}=e,f={};export default function(a){let w=a.percentage||0,h=process.stdout.rows-2||0,$=Math.fround(24*w),g=a.color?[e.hex(a.color),e.bgHex(a.color)]:[c,u],x=g[0](`${a.title}:`),B=d(`${(100*w).toFixed()}%`),j=g[1](" ".repeat($))+g[1].inverse(" ".repeat(24-$));if(0===w&&(f[a.title]=process.hrtime(),a.showBar&&process.stdout.write("\n\n")),a.showBar&&(t(process.stdout,0,h),o(process.stdout),process.stdout.write(`${x} ${j} ${B}`),process.stdout.write("\n"),process.stdout.write(d(a.info.length>80?`${a.info.substring(0,80)}...`:a.info))),1===w){if(!i){let t=process.hrtime(f[a.title]),o=t[0]+t[1]/1e9,e=n;o<10?e=n:o<20?e=l:o<40&&(e=m),process.stdout.write("\n");let i=s(r.programPath,a.output||"dist");p(i,["\\.js$"]),process.stdout.write("\n"),process.stdout.write(d(`Build completed ${n("successfully")}!`)),process.stdout.write("\n"),process.stdout.write(d(`Output files are located in the ${c(`${i}/`)} directory.`)),process.stdout.write("\n"),process.stdout.write(d(`Build took ${e(o.toFixed(2))} seconds.`)),process.stdout.write("\n\n\n")}t(process.stdout,0,h),o(process.stdout)}}
1
+ import{relative as t}from"path";import e from"../paths.mjs";import{isDev as r}from"../process-env.mjs";import{analyzeBundleSize as o,completedInfo as p,progressBar as s}from"@moneko/utils";let i={};export default function(m){if(0===m.percentage&&(i[m.title]=process.hrtime()),m.showBar&&s(m.percentage||0,1,m.title,m.info),1===m.percentage&&(process.stdout.write("\r\x1b[2K"),!r)){let r=process.hrtime(i[m.title]),s=r[0]+r[1]/1e9,a=t(e.programPath,m.output||"dist");o(a,["\\.js$"]),p(s,a)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.21.0",
3
+ "version": "3.21.1",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",