@moneko/core 3.15.18 → 3.15.20
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/build/common.mjs +1 -1
- package/lib/build.mjs +1 -1
- package/lib/config.mjs +1 -1
- package/lib/dev.mjs +1 -1
- package/lib/index.d.mts +1 -2
- package/lib/index.mjs +1 -1
- package/lib/options/reslove.mjs +1 -1
- package/lib/options/swcrc.mjs +1 -1
- package/lib/plugin/lightningcss-plugin.mjs +1 -1
- package/lib/polyfills/polyfills.d.mts +1 -0
- package/lib/polyfills/polyfills.mjs +1 -1
- package/lib/utils/has-pkg.d.mts +1 -1
- package/lib/utils/has-pkg.mjs +1 -1
- package/lib/utils/progress.d.mts +1 -1
- package/lib/utils/progress.mjs +1 -2
- package/lib/vm/info.mjs +1 -1
- package/package.json +1 -1
- package/lib/cjs/index.cjs +0 -1
- package/lib/cjs/index.d.cts +0 -6
- package/lib/cjs/load-module-meta.cjs +0 -1
- package/lib/cjs/load-module-meta.d.cts +0 -2
- package/lib/utils/is-equal.d.mts +0 -2
- package/lib/utils/is-equal.mjs +0 -1
package/lib/build/common.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"mini-css-extract-plugin";import i from"terser-webpack-plugin";import n from"webpack";import{BundleAnalyzerPlugin as m}from"webpack-bundle-analyzer";import{merge as r}from"webpack-merge";import{commonConfig as o}from"../common.mjs";import{CONFIG as t}from"../config.mjs";import{getMinifyOption as
|
|
1
|
+
import e from"mini-css-extract-plugin";import i from"terser-webpack-plugin";import n from"webpack";import{BundleAnalyzerPlugin as m}from"webpack-bundle-analyzer";import{merge as r}from"webpack-merge";import{commonConfig as o}from"../common.mjs";import{CONFIG as t}from"../config.mjs";import{getMinifyOption as l}from"../options/js-minify.mjs";import{LightningCssMinifyPlugin as p}from"../plugin/lightningcss-plugin.mjs";let{optimize:{MinChunkSizePlugin:s}}=n,a=[];t.minifier&&(a.push(new i(l(t.minifier.type,t.minifier.options))),a.push(new p));let u=r(o,{plugins:[new e({filename:"style/[name].bundle.css",chunkFilename:"style/[name].chunk.css",ignoreOrder:!0}),t.splitChunk&&new s({minChunkSize:1e4}),t.bundleAnalyzer&&new m({analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1,defaultSizes:"gzip",logLevel:"silent",...t.bundleAnalyzer})].filter(Boolean),optimization:{splitChunks:t.splitChunk,runtimeChunk:t.runtimeChunk,chunkIds:"named",moduleIds:"named",removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,mangleWasmImports:!0,minimize:!0,minimizer:a}});export default u;
|
package/lib/build.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{removeDirAll as o}from"@moneko/mdx";import r from"webpack";import{merge as m}from"webpack-merge";import t from"./build/common.mjs";import e from"./build/server.mjs";import{CONFIG as i}from"./config.mjs";import s from"./module.config.mjs";import n from"./paths.mjs";import l from"./plugin/done.mjs";import{SSR as a}from"./process-env.mjs";import p from"./utils/log.mjs";import f from"./utils/seo.mjs";import c from"./utils/progress.mjs";import g from"chalk";let{ProgressPlugin:h}=r,u=
|
|
1
|
+
import{removeDirAll as o}from"@moneko/mdx";import r from"webpack";import{merge as m}from"webpack-merge";import t from"./build/common.mjs";import e from"./build/server.mjs";import{CONFIG as i}from"./config.mjs";import s from"./module.config.mjs";import n from"./paths.mjs";import l from"./plugin/done.mjs";import{SSR as a}from"./process-env.mjs";import p from"./utils/log.mjs";import f from"./utils/seo.mjs";import c from"./utils/progress.mjs";import g from"chalk";let{ProgressPlugin:h}=r,u=m(t,{module:s(!1),plugins:[i.done&&new l({done:i.done}),i.bar&&new h({handler(o,r,...m){let t=i.bar;c(o,t.name||"Build",m.length?`[${r}] ${m.join(" ")}`:"",t.color,u.output?.path)}})].filter(Boolean)}),d=[u];a&&d.push(m(t,e));let j=r(d);async function w(){await new Promise(o=>{j.run((r,m)=>{if(r)throw r;if(m&&(m.hasErrors()||m.hasWarnings()))for(let o=0,r=m.stats.length;o<r;o++){let r=m.stats[o];for(let o=0,m=r.compilation.warnings.length;o<m;o++)p(g.yellowBright(r.compilation.warnings[o].message));for(let o=0,m=r.compilation.errors.length;o<m;o++)p(g.redBright(r.compilation.errors[o].message))}o(r)})}),i.seo&&f()}await w(),process.on("exit",function(){o(n.cachePath),o(n.vfsDtsPath)});
|
package/lib/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fileExists as e}from"@moneko/mdx";import{merge as o}from"webpack-merge";import t from"./options/jsx-dom-expressions.mjs";import s from"./options/split-chunk.mjs";import a,{CUSTOMCONFIG as i}from"./paths.mjs";import{APPTYPE as r,FRAMEWORK as n,NODE_ENV as l,PACKAGENAME as p,isDev as m,isLibrary as c,isMobile as u,jsxImportSource as d,mainDirectory as h}from"./process-env.mjs";import{isFunction as f,resolveProgram as g}from"./utils/index.mjs";import x from"./utils/read-conf.mjs";import P from"./utils/setup-env.mjs";let v=["@moneko","neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design","@app",".cache/http/data"],
|
|
1
|
+
import{fileExists as e}from"@moneko/mdx";import{merge as o}from"webpack-merge";import t from"./options/jsx-dom-expressions.mjs";import s from"./options/split-chunk.mjs";import a,{CUSTOMCONFIG as i}from"./paths.mjs";import{APPTYPE as r,FRAMEWORK as n,NODE_ENV as l,PACKAGENAME as p,isDev as m,isLibrary as c,isMobile as u,jsxImportSource as d,mainDirectory as h}from"./process-env.mjs";import{isFunction as f,resolveProgram as g}from"./utils/index.mjs";import x from"./utils/read-conf.mjs";import P from"./utils/setup-env.mjs";let v=["@moneko","neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design","@app",".cache/http/data"],w={devtool:m?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,mode:"csr",bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:""},env:P(l,r,n),basename:"/",publicPath:"/",rem:{designSize:u?375:1680},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":g(h)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},cacheDirectory:a.webpackCachePath,devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:s,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:m,jsxImportSource:d,providerImportSource:`@moneko/${n}/mdx`},jsxDomExpressions:t,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:{allowedUris:[],lockfileLocation:`${a.httpCachePath}/http.lock`,cacheLocation:`${a.httpCachePath}/data`,upgrade:!0},virtualModule:{},cssExtract:{}};async function k(o,t){if(t&&e(o)){let e=(await x(o,t)).default;return f(e)?e(process):e}return{}}c&&(w.alias=Object.assign(w.alias,{"@pkg":a.componentsPath,[p]:a.componentsPath}));let j=w;(!1===(j=o(j,await k(a.configPath,"index"),await k(a.customConfigPath,i))).devtool||!1===j.sourceMap)&&(j.sourceMap=!1,j.devtool=!1),j.fixBrowserRouter&&j.htmlPluginOption&&(j.htmlPluginOption.tags||(j.htmlPluginOption.tags=[]),j.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}));export const CONFIG=j;export const PUBLICPATH=CONFIG.publicPath||"/";
|
package/lib/dev.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{directoryExists as e,fileExists as t,removeDirAll as
|
|
1
|
+
import{directoryExists as e,fileExists as t,loadFileSync as o,removeDirAll as i}from"@moneko/mdx";import s from"express";import r from"multer";import l from"webpack";import n from"webpack-dev-middleware";import m from"webpack-hot-middleware";import{merge as a}from"webpack-merge";import c from"./build/server.mjs";import{commonConfig as p}from"./common.mjs";import{CONFIG as f}from"./config.mjs";import{PORT as d,devLog as u,headers as h}from"./dev/config.mjs";import g from"./dev/mock.mjs";import w from"./dev/proxy.mjs";import x from"./module.config.mjs";import j,{CUSTOMCONFIG as $}from"./paths.mjs";import{SSR as k,isLibrary as y,isReact as b}from"./process-env.mjs";import v from"./utils/has-pkg.mjs";import{empty as P,resolveProgram as _}from"./utils/index.mjs";import S from"./utils/progress.mjs";import C from"./utils/sigint-exit.mjs";import B from"./options/reslove.mjs";import{watchFile as D}from"fs";import{spawn as M,exec as G}from"child_process";import I from"./utils/log.mjs";import L from"chalk";let{HotModuleReplacementPlugin:U,ProgressPlugin:A,WatchIgnorePlugin:F}=l,H=v("stylelint-webpack-plugin")&&(await import("stylelint-webpack-plugin")).default,O=v("eslint-webpack-plugin")&&(await import("eslint-webpack-plugin")).default,R=b&&(await import("@pmmmwh/react-refresh-webpack-plugin")).default,T=["js","jsx","ts","tsx","json","html","vue"],q=T.join(","),E=["css","scss","sass","less","ts","tsx","js","jsx"],N=E.join(","),z=["node_modules/","es/","lib/","umd/","docs/","coverage/","dist/"],J=new URLSearchParams({timeout:2e3,reload:!(v("solid-refresh")||v("react-refresh")),quiet:!0,noInfo:!0,overlay:!0,dynamicPublicPath:!0}).toString(),K=p.output.path;k&&(K=_(`${y?"docs":"dist"}/client`));let Q=a(p,{entry:{main:[`${B.hotMiddlewareClient}?name=client&path=//localhost:${d}/__hmr__&${J}`]},output:{path:K},module:x(!1),plugins:[new U,new F({paths:[/\.d\.ts$/]}),R&&new R,O&&new O({fix:!0,threads:!0,files:[`${f.alias["@"]}/**/*.{${q}}`,y&&`${f.alias["@pkg"]}/**/*.{${q}}`].filter(Boolean),extensions:T,exclude:z,cache:!0,cacheLocation:`${j.lineCachePath}/.eslintcache`,lintDirtyModulesOnly:!0}),H&&new H({fix:!0,threads:!0,files:[`${f.alias["@"]}/**/*.{${N}}`,y&&`${f.alias["@pkg"]}/**/*.{${N}}`].filter(Boolean),extensions:E,exclude:z,cache:!0,cacheLocation:`${j.lineCachePath}/.stylelintcache`,lintDirtyModulesOnly:!0}),f.bar&&new A({handler(e,t,...o){let i=f.bar;S(e,i.name||"Build",o.length?`[${t}] ${o.join(" ")}`:"",i.color)}})].filter(Boolean)}),V=[Q];k&&V.push(a(p,c));let W=l(V);W.compilers[0].hooks.done.tap("client-log",e=>{u(null,e)});let X=s(),Y=r(),Z=n(W,{writeToDisk:!1,index:"index.html",headers:()=>h,serverSideRender:k,lastModified:!0});if(X.use(Z),X.use(m(W,{log:!1,path:"/__hmr__",heartbeat:2e3})),f.proxy&&w(X,f.proxy),e(j.mockPath)){let e=g(j.mockPath);X.use(e)}let ee=`${Q.output.path}/index.html`;X.all("/*",Y.any(),function(e,t,o){if("GET"!==e.method)return o();{let e=Z.context.outputFileSystem,o=e?.readFileSync?.(ee);t.end(o)}});let et=X.listen(d,()=>{});function eo(){process.exit(0)}function ei(e,i){if(i&&t(e)){let t=(o(e)||"").trim().replace(/^\s*[\r\n]/gm,"");D(e,async function(){t!==(o(e)||"").trim().replace(/^\s*[\r\n]/gm,"")?(I(L.yellow(`检测到工程配置${L.blue(`[${i}]`)}变更, 程序即将重启...`)),G("win32"===process.platform?`netstat -ano | findstr :${d}`:`lsof -i :${d}`,(e,t,o)=>{let i=es?t.split(/\s+/).pop():t.split("\n")[1]?.split(/\s+/)[1];i?process.kill(Number(i),"SIGHUP"):I(`未找到占用端口 ${d} 的进程`)})):I(L.gray(`未变更`))})}}ei(j.configPath,"index"),ei(j.customConfigPath,$);let es="win32"===process.platform;process.on("SIGHUP",function(){Z.close(P),et.close(P),et.closeAllConnections(),function(){let e=M(process.argv[0],process.argv.slice(1),{detached:!1,stdio:"inherit"});e.unref(),e.on("close",eo)}()}),process.on("exit",function(){Z.close(P),et.close(P),et.closeAllConnections(),i(j.cachePath),i(j.vfsDtsPath)}),C(eo);
|
package/lib/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ export { realResolve, resolveProgram } from './utils/index.mjs';
|
|
|
4
4
|
export { default as log } from './utils/log.mjs';
|
|
5
5
|
export { default as hasPkg } from './utils/has-pkg.mjs';
|
|
6
6
|
export { default as osTmpDir } from './utils/os-tmp-dir.mjs';
|
|
7
|
+
export { default as require } from './utils/require.mjs';
|
|
7
8
|
export type { MdxOptions } from '@moneko/mdx';
|
|
8
9
|
export type { OverrideResolverOption } from './plugin/override-resolve.mjs';
|
|
9
10
|
export { type YApiOption, type YApiOptionBySchema, yApiMock, yApiSchemaMock, type RequestFormData, type ProxyFuncType, type MockConfiguration, } from './dev/mock.mjs';
|
|
@@ -13,6 +14,4 @@ export { default as jsxDomExpressions, type JsxDomExpressions, } from './options
|
|
|
13
14
|
export { default as splitChunk, type OptimizationSplitChunksOptions, } from './options/split-chunk.mjs';
|
|
14
15
|
export { default as Rule } from './rule.mjs';
|
|
15
16
|
export type { VirtualModulePluginOption } from './plugin/virtual-module.mjs';
|
|
16
|
-
export declare const coreJsVersion: any;
|
|
17
|
-
export declare const loadModuleMeta: any;
|
|
18
17
|
export type * from '../typings/global.js';
|
package/lib/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as paths,CUSTOMCONFIG,yarnArgv,routeDir}from"./paths.mjs";export{APPTYPE,FRAMEWORK,PACKAGENAME,PACKAGEVERSION,coreName,isDev,isLibrary,isMicro,mainDirectory}from"./process-env.mjs";export{realResolve,resolveProgram}from"./utils/index.mjs";export{default as log}from"./utils/log.mjs";export{default as hasPkg}from"./utils/has-pkg.mjs";export{default as osTmpDir}from"./utils/os-tmp-dir.mjs";export{yApiMock,yApiSchemaMock}from"./dev/mock.mjs";export{getIPv4,getPort}from"./dev/net.mjs";export{default as jsxDomExpressions}from"./options/jsx-dom-expressions.mjs";export{default as splitChunk}from"./options/split-chunk.mjs";export{default as Rule}from"./rule.mjs";
|
|
1
|
+
export{default as paths,CUSTOMCONFIG,yarnArgv,routeDir}from"./paths.mjs";export{APPTYPE,FRAMEWORK,PACKAGENAME,PACKAGEVERSION,coreName,isDev,isLibrary,isMicro,mainDirectory}from"./process-env.mjs";export{realResolve,resolveProgram}from"./utils/index.mjs";export{default as log}from"./utils/log.mjs";export{default as hasPkg}from"./utils/has-pkg.mjs";export{default as osTmpDir}from"./utils/os-tmp-dir.mjs";export{default as require}from"./utils/require.mjs";export{yApiMock,yApiSchemaMock}from"./dev/mock.mjs";export{getIPv4,getPort}from"./dev/net.mjs";export{default as jsxDomExpressions}from"./options/jsx-dom-expressions.mjs";export{default as splitChunk}from"./options/split-chunk.mjs";export{default as Rule}from"./rule.mjs";
|
package/lib/options/reslove.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"../utils/require.mjs";import e from"../utils/has-pkg.mjs";export default{styleLoader:s.resolve("style-loader"),cssLoader:s.resolve("css-loader"),sassLoader:e("sass
|
|
1
|
+
import s from"../utils/require.mjs";import e from"../utils/has-pkg.mjs";export default{styleLoader:s.resolve("style-loader"),cssLoader:s.resolve("css-loader"),sassLoader:e("sass-loader"),lessLoader:s.resolve("less-loader"),swcLoader:s.resolve("swc-loader"),transformImports:e("@moneko/transform-imports"),jsxDomExpressions:e("@moneko/jsx-dom-expressions"),hotMiddlewareClient:s.resolve("webpack-hot-middleware/client.js")};
|
package/lib/options/swcrc.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{merge as e}from"webpack-merge";import{CONFIG as r}from"../config.mjs";import o from"../paths.mjs";import{coreJsVersion as
|
|
1
|
+
import{merge as e}from"webpack-merge";import{CONFIG as r}from"../config.mjs";import o from"../paths.mjs";import t,{coreJsVersion as s}from"../polyfills/polyfills.mjs";import{isDev as m,isReact as a,isSolid as l,jsxImportSource as p}from"../process-env.mjs";import i from"./reslove.mjs";let c=function(e){for(let r=0,o=Object.keys(e),t=o.length;r<t;r++)e[o[r]].transform=`${o[r]}/${e[o[r]].transform}`,e[o[r]].style&&(e[o[r]].style=`${o[r]}/${e[o[r]].style}`);return e}(r.importOnDemand||{}),n={include:t(),mode:"entry",coreJs:s};export default((t,s={})=>e({module:{type:"es6",resolveFully:!0},jsc:{parser:{syntax:"typescript",tsx:!0,decorators:!0,dynamicImport:!0},loose:!0,target:r.polyfill?void 0:"es2017",externalHelpers:!1,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:"automatic",throwIfNamespace:!0,refresh:a&&m,development:m,importSource:p},optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:o.swcCachePath,plugins:[[i.transformImports,c],l&&[i.jsxDomExpressions,{...r.jsxDomExpressions,generate:t?"ssr":"dom",hydratable:t}]].filter(Boolean)}},env:r.polyfill?n:void 0,sourceMaps:!0,parseMap:!0},"function"==typeof r.swcrc?r.swcrc(m):r.swcrc||{},s));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Buffer as s}from"buffer";import{transform as t}from"lightningcss";import i from"webpack";import{
|
|
1
|
+
import{Buffer as s}from"buffer";import{transform as t}from"lightningcss";import i from"webpack";import{paths as o}from"../index.mjs";import n from"../utils/require.mjs";let{sources:{RawSource:e,SourceMapSource:r},ModuleFilenameHelpers:{matchObject:a}}=i,m="lightning-css-minify",p=/\.css(?:\?.*)?$/i,{name:f,version:c}=n(`${o.programPath}/package.json`);export class LightningCssMinifyPlugin{constructor(s={}){let{implementation:i,...o}=s;if(i&&"function"!=typeof i.transform)throw TypeError(`[LightningCssMinifyPlugin]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof i.transform}`);this.transform=i?.transform??t,this.options=o}apply(s){let t=JSON.stringify({name:f,version:c,options:this.options});s.hooks.compilation.tap(m,s=>{s.hooks.chunkHash.tap(m,(s,i)=>i.update(t)),s.hooks.processAssets.tapPromise({name:m,stage:s.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,additionalAssets:!0},async()=>await this.transformAssets(s)),s.hooks.statsPrinter.tap(m,s=>{s.hooks.print.for("asset.info.minimized").tap(m,(s,{green:t,formatFlag:i})=>s&&t&&i?t(i("minimized")):void 0)})})}async transformAssets(t){let{options:{devtool:i}}=t.compiler,{include:o,exclude:n,test:m,sourceMap:f=!!(i&&i.includes("source-map")),...c}=this.options,l=t.getAssets().filter(s=>!s.info.minimized&&(m||p).test(s.name)&&a({include:o,exclude:n},s.name));await Promise.all(l.map(async i=>{let o;let{source:n,map:a}=i.source.sourceAndMap(),m=n.toString(),p="string"==typeof n?s.from(n):n,l=this.transform({filename:i.name,code:p,minify:!0,sourceMap:f,...c}),g=l.code.toString();o=f?new r(g,i.name,JSON.parse(l.map.toString()),m,a,!0):new e(g),t.updateAsset(i.name,o,{...i.info,minimized:!0})}))}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"core-js-compat";import{getBrowsersTargets as
|
|
1
|
+
import r from"core-js-compat";import{getBrowsersTargets as o}from"./targets.mjs";import e from"../utils/require.mjs";let s=e("core-js/package.json").version;export const coreJsVersion=s.substring(0,s.indexOf(".",2));export default function(){return r({targets:o(),version:coreJsVersion}).list}
|
package/lib/utils/has-pkg.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function hasPkg(name: string):
|
|
1
|
+
declare function hasPkg(name: string): string | false;
|
|
2
2
|
export default hasPkg;
|
package/lib/utils/has-pkg.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./require.mjs";export default function(e){try{return r.resolve(e)}catch(r){return!1}}
|
package/lib/utils/progress.d.mts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @param {String} info 详细信息
|
|
6
6
|
* @constructor
|
|
7
7
|
*/
|
|
8
|
-
declare function progress(num: number | undefined, title: string, info: string, color?: string): void;
|
|
8
|
+
declare function progress(num: number | undefined, title: string, info: string, color?: string, output?: string): void;
|
|
9
9
|
export default progress;
|
package/lib/utils/progress.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import e
|
|
2
|
-
${s(u)}`;0===c&&process.stdout.write("\n\n"),e.cursorTo(process.stdout,0,n),e.clearScreenDown(process.stdout),process.stdout.write(f),1===c&&(e.cursorTo(process.stdout,0,n),e.clearScreenDown(process.stdout))}
|
|
1
|
+
import{cursorTo as t,clearScreenDown as e}from"readline";import{relative as o}from"path";import s from"chalk";import r from"./log.mjs";import p from"../paths.mjs";let{blue:i,bgBlue:d,grey:c,green:u,yellow:m,red:l}=s,a={};export default function(f=0,n,h,$,w="dist/"){let x=process.stdout.rows-2,g=Math.fround(24*f),j=$?[s.hex($),s.bgHex($)]:[i,d],k=j[0](`${n}:`),y=c(`${(100*f).toFixed()}%`),B=j[1](" ".repeat(g))+j[1].inverse(" ".repeat(24-g));if(0===f&&(a[n]=process.hrtime(),process.stdout.write("\n\n")),t(process.stdout,0,x),e(process.stdout),process.stdout.write(`${k} ${B} ${y}`),process.stdout.write("\n"),process.stdout.write(c(h)),1===f){let s=process.hrtime(a[n]),d=s[0]+s[1]/1e9,f=u;d<10?f=u:d<20?f=m:d<40&&(f=l),r(["",c(`Build completed ${u("successfully")}!`),c(`Output files are located in the ${i(`${o(p.programPath,w)}/`)} directory.`),c(`Build took ${f(d.toFixed(2))} seconds.`),"",""]),t(process.stdout,0,x),e(process.stdout)}}
|
package/lib/vm/info.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIG as r}from"../config.mjs";import{APPTYPE as
|
|
1
|
+
import{CONFIG as r}from"../config.mjs";import e from"../paths.mjs";import o from"../utils/require.mjs";import{APPTYPE as t,PACKAGENAME as s,PACKAGEVERSION as i,SSR as m}from"../process-env.mjs";import{toUpperCaseString as p}from"../utils/index.mjs";let{description:a,author:n,repository:c,keywords:f}=o(`${e.programPath}/package.json`),d="string"==typeof n,l={name:s,projectName:p(s).replace(/-/g," "),ssr:m,version:i,base:r.basename,type:t,routerMode:r.routerMode,prefixCls:r.prefixCls,theme:r.theme,description:a,author:d?{name:n}:n,repository:d?{url:c}:c};export const description=a;export const keywords=Array.isArray(f)?f.toString():"";export default l;
|
package/package.json
CHANGED
package/lib/cjs/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return o}});const t=(e=require("./load-module-meta.cjs"))&&e.__esModule?e:{default:e},r=(0,t.default)("core-js/package.json").version,o={coreJsVersion:r.substring(0,r.indexOf(".",2)),loadModuleMeta:t.default};
|
package/lib/cjs/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e}});const e=function(e){return require(require.resolve(e))};
|
package/lib/utils/is-equal.d.mts
DELETED
package/lib/utils/is-equal.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function t(e,r){let n=Object.prototype.toString.call(e);return n===Object.prototype.toString.call(r)&&(Array.isArray(e)&&Array.isArray(r)?function(e,r){if(e.length!==r.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!t(e[n],r[n]))return!1;return!0}(e,r):"[object Object]"===n?function(e,r){let n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(let o=0,c=n.length;o<c;o++){let c=n[o];if(!t(e[c],r[c]))return!1}return!0}(e,r):["[object Function]","[object AsyncFunction]","[object GeneratorFunction]","[object Proxy]"].includes(n)?e.toString()===r.toString():e===r)}
|