@moneko/core 3.20.2 → 3.20.3-beta.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/lib/dev/config.mjs +3 -3
- package/lib/dev/net.mjs +1 -1
- package/lib/utils/progress.mjs +1 -1
- package/package.json +4 -4
package/lib/dev/config.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import e from"chalk";import{getIPv4 as t,getPort as r}from"./net.mjs";import{CONFIG as o}from"../config.mjs";import
|
|
2
|
-
`);function f(e){return`${o.devServer.https?"https":"http"}://${"local"===e?o.devServer.host:t()}:${PORT}${d}`}let
|
|
3
|
-
${a(" Network ")} ${$(f("net"))}`;export function devLog(e,t){!e&&t&&(process.stdout.write("\x1b[2J\x1b[3J\x1b[H"),
|
|
1
|
+
import e from"chalk";import{getIPv4 as t,getPort as r}from"./net.mjs";import{CONFIG as o}from"../config.mjs";import i from"../utils/log.mjs";let{yellow:s,green:n,grey:m,gray:l,bgBlue:p,bgGreenBright:a,blueBright:c,greenBright:$}=e,u=o.devServer.port||3e3;export const PORT=await r(u);o.devServer.port=PORT;let d="/"===o.basename?"":o.basename,v=u!==PORT&&l(`Port ${s(u)} is in use, trying ${n(PORT)} instead.
|
|
2
|
+
`);function f(e){return`${o.devServer.https?"https":"http"}://${"local"===e?o.devServer.host:t()}:${PORT}${d}`}let T=l("You application is running here:"),h=`${p(" Local ")} ${c(f("local"))}
|
|
3
|
+
${a(" Network ")} ${$(f("net"))}`;export function devLog(e,t){!e&&t&&(process.stdout.write("\x1b[2J\x1b[3J\x1b[H"),i([T,"",h,"",m(`Compiled successfully in ${n(`${t.endTime-t.startTime}ms`)}`)]),v&&i(v))}
|
package/lib/dev/net.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createConnection as e}from"net";import{networkInterfaces as t}from"os";export function getIPv4(){let e=t(),r=null,o=Object.keys(e);for(let t=0,n=o.length;t<n;t++){let n=e[o[t]]||[];for(let e=0,t=n.length;e<t;e++){let t=n[e];"IPv4"!==t.family||t.internal||(r=t.address)}}return r}export function getPort(t,r="0.0.0.0"){return new Promise(o=>{if("number"!=typeof t)o(t);else{let
|
|
1
|
+
import{createConnection as e}from"net";import{networkInterfaces as t}from"os";export function getIPv4(){let e=t(),r=null,o=Object.keys(e);for(let t=0,n=o.length;t<n;t++){let n=e[o[t]]||[];for(let e=0,t=n.length;e<t;e++){let t=n[e];"IPv4"!==t.family||t.internal||(r=t.address)}}return r}export function getPort(t,r="0.0.0.0"){return new Promise((o,n)=>{if("number"!=typeof t)o(t);else{let l=e(t,r);l.on("connect",()=>{l.destroy(),o(getPort(t+1,r))}),l.on("error",e=>{l.destroy(e),"ECONNREFUSED"===e.code?o(t):n(e)})}})}
|
package/lib/utils/progress.mjs
CHANGED
|
@@ -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";let{blue:
|
|
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(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")}t(process.stdout,0,h),o(process.stdout)}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.3-beta.0",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@babel/core": "7.24.7",
|
|
17
17
|
"@moneko/mdx": "0.1.39",
|
|
18
18
|
"@moneko/transform-imports": "0.6.0",
|
|
19
|
-
"@moneko/utils": "0.1.
|
|
20
|
-
"@swc/core": "1.6.
|
|
19
|
+
"@moneko/utils": "0.1.9",
|
|
20
|
+
"@swc/core": "1.6.13",
|
|
21
21
|
"@typescript/vfs": "1.5.3",
|
|
22
22
|
"browserslist": "4.23.1",
|
|
23
23
|
"chalk": "5.3.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
59
59
|
"@types/webpack-hot-middleware": "2.25.9",
|
|
60
60
|
"babel-plugin-react-compiler": "0.0.0-experimental-696af53-20240625",
|
|
61
|
-
"oxlint": "^0.5.
|
|
61
|
+
"oxlint": "^0.5.3",
|
|
62
62
|
"sass": "1.77.6",
|
|
63
63
|
"sass-loader": "14.2.1",
|
|
64
64
|
"solid-refresh": "0.7.5"
|