@moneko/core 3.30.0 → 3.30.2

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,3 +1,3 @@
1
1
  import{ink as e,println as t,termClear as o}from"@moneko/utils";import{getIPv4 as r,getPort as n}from"../commom/net.mjs";import{CONFIG as i}from"../config.mjs";let m=i.devServer.port||3e3;export const PORT=await n(m);i.devServer.port=PORT;let s="/"===i.basename?"":i.basename,l=m!==PORT&&e(`Port ${e(`${m}`,"yellow")} is in use, trying ${e(`${PORT}`,"green")} instead.
2
2
  `,"245");function $(e){return`${i.devServer.https?"https":"http"}://${"local"===e?i.devServer.host:r()}:${PORT}${s}`}let a=e("You application is running here:","245"),p=`${e(" Local ","231",{bg:"blue"})} ${e($("local"),"75")}
3
- ${e(" Network ","231",{bg:"29"})} ${e($("net"),"green")}`;export function devLog(r,n){!r&&n&&(o(3),t([a,"",p,"",e(`Compiled successfully in ${e(`${n.endTime-n.startTime}ms`,"green")}`,"245"),"\n"].join("\n"),!0),l&&t(l))}
3
+ ${e(" Network ","231",{bg:"29"})} ${e($("net"),"green")}`;export function devLog(r,n){!r&&n&&(o(3),t([a,"",p,"",e(`Compiled successfully in ${e(`${n.endTime-n.startTime}ms`,"green")}`,"245"),""].join("\n"),!0),l&&t(l))}
@@ -1 +1 @@
1
- import{join as p}from"node:path";import{getAppEntry as m,getAppFallback as o,getAppMdxScope as e,getAppMergeRouter as t,getAppNormalizeCss as r,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import{updateFileSync as n}from"@moneko/utils";import f from"../commom/has-pkg.mjs";import l from"../commom/paths.mjs";import d from"../commom/rule.mjs";import{CONFIG as c}from"../config.mjs";import j from"../plugin/module-federation.mjs";import{APPTYPE as x,FRAMEWORK as u}from"../process-env.mjs";import g from"../utils/create-types.mjs";import{generateDeclaration as v}from"../utils/dts.mjs";import{node_modules as h,transformModule as k}from"../utils/index.mjs";import y from"./coverage.mjs";import{docs as b,docsModuleName as z}from"./docs.mjs";import D from"./info.mjs";import{locales as C,localesModuleName as P}from"./locales.mjs";import M from"./render-app.mjs";import{route as O,routesModuleName as S}from"./routes.mjs";let q=f(p(c.alias["@"],"./mdx-scope.tsx"))||f(p(c.alias["@"],"./mdx-scope.ts")),w={"@app/env.ts":c.env,"@app/info.ts":D,"@app/render.tsx":"react"===u?M:"","@app/entry.ts":m(p(c.alias["@"],"./index.ts"),!!j.length,!!c.rem,!!c.normalizeCss,x,u),"@app/rem":a(c.rem?.designSize||1680),"@app/fallback":o(c.fallbackCompPath),"@app/coverage":y(l.coveragePath),"@app/merge-router":t(),"@app/prefix-router":s(),"@app/normalize/index.css":r(),"@app/suspense/index.tsx":i(x,u),"@app/mdx-scope.tsx":q?e(q):"export {}","@app/routes":O.getData(S),"@app/locales":C.getData(P),"@app/docs":b.getData(z)};n(h("@types/@app/index.d.ts"),["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(p=>g(p.replace(d.js,""),v(k(w[p]),p))).join("\n"));let A=h("@types/@vm/index.d.ts"),B=c.virtualModule||{};n(A,Object.keys(B).map(p=>g(p,v(k(B[p]),p))).join("\n"));export default w;
1
+ import{join as p}from"node:path";import{getAppEntry as m,getAppFallback as o,getAppMdxScope as e,getAppMergeRouter as t,getAppNormalizeCss as r,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import{updateFileSync as n}from"@moneko/utils";import f from"../commom/has-pkg.mjs";import l from"../commom/paths.mjs";import d from"../commom/rule.mjs";import{CONFIG as c}from"../config.mjs";import j from"../plugin/module-federation.mjs";import{APPTYPE as x,FRAMEWORK as u}from"../process-env.mjs";import g from"../utils/create-types.mjs";import{generateDeclaration as v}from"../utils/dts.mjs";import{node_modules as h,transformModule as k}from"../utils/index.mjs";import y from"./coverage.mjs";import{docs as b,docsModuleName as z}from"./docs.mjs";import D from"./info.mjs";import{locales as C,localesModuleName as P}from"./locales.mjs";import M from"./render-app.mjs";import{route as O,routesModuleName as S}from"./routes.mjs";let q=f(p(c.alias["@"],"./mdx-scope.tsx"))||f(p(c.alias["@"],"./mdx-scope.ts")),w={"@app/env.ts":c.env,"@app/info.ts":D,"@app/render.tsx":"react"===u?M:"","@app/entry.ts":m(p(c.alias["@"],"./index.ts"),!!j.length,!!c.rem,!!c.normalizeCss,x,u),"@app/rem":a(c.rem?.designSize||1680),"@app/fallback":o(c.fallbackCompPath),"@app/coverage":y(l.coveragePath),"@app/merge-router":t(),"@app/prefix-router":s(),"@app/normalize/index.css":r(),"@app/suspense/index.tsx":i(x,u),"@app/mdx-scope.tsx":q?e(q):"export default {}","@app/routes":O.getData(S),"@app/locales":C.getData(P),"@app/docs":b.getData(z)};n(h("@types/@app/index.d.ts"),["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(p=>g(p.replace(d.js,""),v(k(w[p]),p))).join("\n"));let A=h("@types/@vm/index.d.ts"),B=c.virtualModule||{};n(A,Object.keys(B).map(p=>g(p,v(k(B[p]),p))).join("\n"));export default w;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.30.0",
3
+ "version": "3.30.2",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -442,9 +442,9 @@ export declare type ConfigType = {
442
442
  * }
443
443
  * // 使用
444
444
  * import a from 'custom-module-1';
445
- * import b from 'custom-module-2';
445
+ * import { age } from 'custom-module-2';
446
446
  * console.log(a); // { name: "user1" }
447
- * console.log(b); // { age: 12 }
447
+ * console.log(age); // 12
448
448
  */
449
449
  virtualModule?: VirtualModulePluginOption;
450
450
  /** 是否使用 normalize css