@moneko/core 3.24.4 → 3.24.5-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/config.mjs CHANGED
@@ -1 +1 @@
1
- import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import s from"./paths.mjs";import{APPTYPE as n,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as l,isDev as a,isLibrary as m,isMobile as p,jsxImportSource as u,mainDirectory as c}from"./process-env.mjs";import{isFunction as d,resolveProgram as f}from"./utils/index.mjs";import h from"./utils/setup-env.mjs";import{fileExists as g}from"@moneko/utils";import x from"./utils/require.mjs";let v=["@app","@moneko","neko-ui",".cache/http/data","@ant-design","@element-plus","ant-design-vue","antd","antd-mini","antd-mobile","antd-mobile-icons","element-plus","element-ui","ng-zorro-antd","@antv","@mui","ahooks","rc-queue-anim","umi","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design"],P={devtool:a?"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:h(r,n,i),basename:"/",publicPath:"/",rem:{designSize:p?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":f(c)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:t,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:a,jsxImportSource:u,providerImportSource:`@moneko/${i}/mdx`},jsxDomExpressions:o,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:{maxAssetSize:256e3,maxEntrypointSize:256e3,assetFilter:e=>!e.endsWith(".map")&&!e.endsWith("ce28377f3a428346.js")},refresh:!0};function j(e){if(g(e)){let o=x(e).default;return d(o)?o(process):o}return{}}m&&(P.alias=Object.assign(P.alias,{"@pkg":s.componentsPath,[l]:s.componentsPath}));let b=P;(!1===(b=e(b,j(s.configPath),j(s.customConfigPath))).devtool||!1===b.sourceMap)&&(b.sourceMap=!1,b.devtool=!1),b.fixBrowserRouter&&b.htmlPluginOption&&(b.htmlPluginOption.tags||(b.htmlPluginOption.tags=[]),b.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=b;export const PUBLICPATH=CONFIG.publicPath;
1
+ import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import s from"./paths.mjs";import{APPTYPE as n,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as a,isDev as l,isLibrary as m,isMobile as p,jsxImportSource as u,mainDirectory as c}from"./process-env.mjs";import{isFunction as d,resolveProgram as f}from"./utils/index.mjs";import h from"./utils/setup-env.mjs";import{fileExists as g}from"@moneko/utils";import x from"./utils/require.mjs";let v=["@app","@moneko","neko-ui",".cache/http/data","@ant-design","@element-plus","ant-design-vue","antd","antd-mini","antd-mobile","antd-mobile-icons","element-plus","element-ui","ng-zorro-antd","@antv","@mui","@du","ahooks","rc-queue-anim","umi","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design"],P={devtool:l?"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:await h(r,n,i),basename:"/",publicPath:"/",rem:{designSize:p?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":f(c)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:t,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:l,jsxImportSource:u,providerImportSource:`@moneko/${i}/mdx`},jsxDomExpressions:o,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:{maxAssetSize:256e3,maxEntrypointSize:256e3,assetFilter:e=>!e.endsWith(".map")&&!e.endsWith("ce28377f3a428346.js")},refresh:!0};function j(e){if(g(e)){let o=x(e).default;return d(o)?o(process):o}return{}}m&&(P.alias=Object.assign(P.alias,{"@pkg":s.componentsPath,[a]:s.componentsPath}));let w=P;(!1===(w=e(w,j(s.configPath),j(s.customConfigPath))).devtool||!1===w.sourceMap)&&(w.sourceMap=!1,w.devtool=!1),w.fixBrowserRouter&&w.htmlPluginOption&&(w.htmlPluginOption.tags||(w.htmlPluginOption.tags=[]),w.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=w;export const PUBLICPATH=CONFIG.publicPath;
@@ -1,3 +1,6 @@
1
- import { type DotenvParseOutput } from 'dotenv';
2
- declare function setupEnv(mode: string, type: string, framework: string): DotenvParseOutput;
1
+ declare function setupEnv(mode: string, type: string, framework: string): Promise<{
2
+ NODE_ENV: string;
3
+ APPTYPE: string;
4
+ FRAMEWORK: string;
5
+ }>;
3
6
  export default setupEnv;
@@ -1 +1 @@
1
- import{relative as r}from"path";import{config as t}from"dotenv";import o from"../paths.mjs";export default function(e,a,p){let n=[r(o.programPath,".env"),r(o.programPath,".env/.env"),r(o.programPath,`.env/.${"production"===e?"prod":"dev"}.env`)],m={NODE_ENV:e,APPTYPE:a,FRAMEWORK:p};return n.forEach(r=>{let o=t({path:r,override:!0}).parsed;o&&Object.assign(m,o)}),m}
1
+ import{loadFile as r}from"@moneko/utils";import{relative as t}from"path";import e from"../paths.mjs";async function o(o,a,i){let n=[t(e.programPath,".env"),t(e.programPath,".env/.env"),t(e.programPath,`.env/.${"production"===o?"prod":"dev"}.env`)],m={NODE_ENV:o,APPTYPE:a,FRAMEWORK:i};return(await Promise.all(n.map(r))).forEach(r=>{r&&Object.assign(m,r.split("\n").reduce((r,t)=>{if(!t||t.trim().startsWith("#"))return r;let[e,...o]=t.split("=");if(!e)return r;let a=o.join("=").trim();return r[e.trim()]=a.replace(/^["']|["']$/g,""),r},{}))}),m}export default o;
@@ -1 +1 @@
1
- import{join as t}from"path";import{getAppEntry as e,getAppFallback as p,getAppMdxScope as r,getAppMergeRouter as o,getAppNormalizeCss as m,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import l from"./coverage.mjs";import{docs as n,docsModuleName as f}from"./docs.mjs";import d from"./info.mjs";import{locales as u,localesModuleName as x}from"./locales.mjs";import{route as j,routesModuleName as c}from"./routes.mjs";import{CONFIG as g}from"../config.mjs";import v from"../paths.mjs";import{APPTYPE as y,FRAMEWORK as h}from"../process-env.mjs";import{node_modules as k}from"../utils/index.mjs";import{generateDeclaration as O}from"../utils/dts.mjs";import S from"../utils/has-pkg.mjs";import{removeFile as b,saveFileSync as z}from"@moneko/utils";import D from"../plugin/module-federation.mjs";import J from"../utils/create-types.mjs";import N from"../rule.mjs";let $=S(t(g.alias["@"],"./mdx-scope.tsx"))||S(t(g.alias["@"],"./mdx-scope.ts")),C={[k("@app/env.ts")]:`export default ${JSON.stringify(g.env)}`,[k("@app/info.ts")]:`export default ${JSON.stringify(d)}`,[k("@app/entry.ts")]:e(t(g.alias["@"],"./index.ts"),!!D.length,!!g.rem,!!g.normalizeCss,y,h),[k("@app/rem")]:a(g.rem?.designSize||1680),[k("@app/fallback")]:p(g.fallbackCompPath),[k("@app/coverage")]:l(v.coveragePath),[k("@app/merge-router")]:o(),[k("@app/prefix-router")]:s(),[k("@app/normalize/index.css")]:m(),[k("@app/suspense/index.tsx")]:i(y,h),[k("@app/mdx-scope.tsx")]:$?r($):"export default {}",[k(c)]:j.getData(c),[k(x)]:u.getData(x),[k(f)]:n.getData(f)},M=k("@types/@app/index.d.ts");b(M),z(M,["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(t=>{let e=k(t);return J(t.replace(N.js,""),O(C[e],e))}).join("\n"));let P=k("@types/@vm/index.d.ts");b(P),z(P,Object.keys(g.virtualModule).map(t=>{let e=g.virtualModule[t];return J(t.replace(N.js,""),O("string"==typeof e?e:`export default ${JSON.stringify(e)}`,k(t)))}).join("\n"));export default C;
1
+ import{join as t}from"path";import{getAppEntry as e,getAppFallback as p,getAppMdxScope as r,getAppMergeRouter as o,getAppNormalizeCss as m,getAppPrefixRouter as s,getAppRem as a,getAppSuspense as i}from"@moneko/mdx";import n from"./coverage.mjs";import{docs as f,docsModuleName as l}from"./docs.mjs";import d from"./info.mjs";import{locales as u,localesModuleName as x}from"./locales.mjs";import{route as j,routesModuleName as c}from"./routes.mjs";import{CONFIG as g}from"../config.mjs";import v from"../paths.mjs";import{APPTYPE as y,FRAMEWORK as h}from"../process-env.mjs";import{node_modules as k}from"../utils/index.mjs";import{generateDeclaration as O}from"../utils/dts.mjs";import S from"../utils/has-pkg.mjs";import{updateFileSync as b}from"@moneko/utils";import z from"../plugin/module-federation.mjs";import D from"../utils/create-types.mjs";import J from"../rule.mjs";let N=S(t(g.alias["@"],"./mdx-scope.tsx"))||S(t(g.alias["@"],"./mdx-scope.ts")),$={[k("@app/env.ts")]:`export default ${JSON.stringify(g.env)}`,[k("@app/info.ts")]:`export default ${JSON.stringify(d)}`,[k("@app/entry.ts")]:e(t(g.alias["@"],"./index.ts"),!!z.length,!!g.rem,!!g.normalizeCss,y,h),[k("@app/rem")]:a(g.rem?.designSize||1680),[k("@app/fallback")]:p(g.fallbackCompPath),[k("@app/coverage")]:n(v.coveragePath),[k("@app/merge-router")]:o(),[k("@app/prefix-router")]:s(),[k("@app/normalize/index.css")]:m(),[k("@app/suspense/index.tsx")]:i(y,h),[k("@app/mdx-scope.tsx")]:N?r(N):"export default {}",[k(c)]:j.getData(c),[k(x)]:u.getData(x),[k(l)]:f.getData(l)};b(k("@types/@app/index.d.ts"),["@app/env.ts","@app/info.ts","@app/entry.ts","@app/mdx-scope.tsx"].map(t=>{let e=k(t);return D(t.replace(J.js,""),O($[e],e))}).join("\n")),b(k("@types/@vm/index.d.ts"),Object.keys(g.virtualModule).map(t=>{let e=g.virtualModule[t];return D(t.replace(J.js,""),O("string"==typeof e?e:`export default ${JSON.stringify(e)}`,k(t)))}).join("\n"));export default $;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.24.4",
3
+ "version": "3.24.5-beta.0",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -25,7 +25,6 @@
25
25
  "core-js": "3.39.0",
26
26
  "core-js-compat": "3.39.0",
27
27
  "css-loader": "7.1.2",
28
- "dotenv": "16.4.5",
29
28
  "express": "5.0.1",
30
29
  "html-webpack-plugin": "5.6.3",
31
30
  "http-proxy-middleware": "3.0.3",