@moneko/core 3.10.1 → 3.10.3

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.
Files changed (2) hide show
  1. package/lib/dev.mjs +1 -1
  2. package/package.json +4 -4
package/lib/dev.mjs CHANGED
@@ -1 +1 @@
1
- import{directoryExists as e,removeDirAll as t}from"@moneko/mdx";import o from"express";import i from"multer";import r from"webpack";import s from"webpack-dev-middleware";import l from"webpack-hot-middleware";import{merge as m}from"webpack-merge";import n from"./build/server.mjs";import{commonConfig as a}from"./common.mjs";import{CONFIG as p}from"./config.mjs";import{PORT as c,devLog as d,headers as u}from"./dev/config.mjs";import f from"./dev/mock.mjs";import h from"./dev/proxy.mjs";import w from"./module.config.mjs";import g from"./paths.mjs";import{SSR as j,isLibrary as x,isReact as k}from"./process-env.mjs";import b from"./rule.mjs";import y from"./utils/compiler-listener.mjs";import $ from"./utils/has-pkg.mjs";import{empty as v,resolveProgramPath as _}from"./utils/index.mjs";import P from"./utils/progress.mjs";import S from"./utils/sigint-exit.mjs";let{HotModuleReplacementPlugin:B,ProgressPlugin:D,WatchIgnorePlugin:T}=r,E=$("stylelint-webpack-plugin")&&(await import("stylelint-webpack-plugin")).default,F=$("eslint-webpack-plugin")&&(await import("eslint-webpack-plugin")).default,M=k&&(await import("@pmmmwh/react-refresh-webpack-plugin")).default,O=["js","jsx","ts","tsx","json","html","vue"],R=O.join(","),U=["css","scss","sass","less","ts","tsx","js","jsx"],q=U.join(","),A=["node_modules/","es/","lib/","umd/","docs/","coverage/","dist/"],C=new URLSearchParams({timeout:2e3,reload:!0,quiet:!0,noInfo:!0,overlay:!0,dynamicPublicPath:!0}).toString(),G=a.output.path;j&&(G=_(`${x?"docs":"dist"}/client`));let I=m(a,{entry:{main:[`webpack-hot-middleware/client?name=client&path=//localhost:${c}/__hmr__&${C}`]},output:{path:G},module:w(!1),plugins:[new B,new T({paths:[/\.d\.ts$/]}),M&&new M,F&&new F({fix:!0,threads:!0,files:[`${p.alias["@"]}/**/*.{${R}}`,x&&`${p.alias["@pkg"]}/**/*.{${R}}`].filter(Boolean),extensions:O,exclude:A,cache:!0,lintDirtyModulesOnly:!0}),E&&new E({fix:!0,threads:!0,files:[`${p.alias["@"]}/**/*.{${q}}`,x&&`${p.alias["@pkg"]}/**/*.{${q}}`].filter(Boolean),extensions:U,exclude:A,cache:!0,lintDirtyModulesOnly:!0}),p.bar&&new D({handler(e,t,...o){let i=p.bar;P(e,i.name||"Build",o.length?`[${t}] ${o.join(" ")}`:"",i.color)}})].filter(Boolean)}),L=[I];j&&L.push(m(a,n));let[z,H]=r(L).compilers;z.hooks.done.tap("client",e=>{d(null,e)});let J=o(),K=i(),N=s(z,{writeToDisk:!1,index:"index.html",headers:()=>u,serverSideRender:j});if(J.use(N),J.use(l(z,{log:!1,path:"/__hmr__",heartbeat:2e3,ignoreUnaccepted:!1,ignoreDeclined:!0,ignoreErrored:!0})),p.proxy&&h(J,p.proxy),e(g.mockPath)){let e=f(g.mockPath);J.use(e)}let Q=`${I.output.path}/index.html`;J.all("/*",K.any(),function(e,t,o){if("GET"!==e.method)return o();{let e=N.context.outputFileSystem,o=e?.readFileSync?.(Q);t.end(o)}});let V=[y("client",z)];H&&(H.watch({aggregateTimeout:20,ignored:b.dev_watch_ignored,poll:1e3,stdin:!0},d),V.push(y("server",H))),await Promise.all(V);let W=J.listen(c,()=>{});process.on("exit",function(){W.close(v),W.closeAllConnections(),t(g.cachePath)}),S(process.exit(1));
1
+ import{directoryExists as e,removeDirAll as t}from"@moneko/mdx";import o from"express";import i from"multer";import r from"webpack";import s from"webpack-dev-middleware";import l from"webpack-hot-middleware";import{merge as m}from"webpack-merge";import n from"./build/server.mjs";import{commonConfig as a}from"./common.mjs";import{CONFIG as p}from"./config.mjs";import{PORT as c,devLog as d,headers as u}from"./dev/config.mjs";import f from"./dev/mock.mjs";import h from"./dev/proxy.mjs";import w from"./module.config.mjs";import g from"./paths.mjs";import{SSR as j,isLibrary as x,isReact as k}from"./process-env.mjs";import b from"./rule.mjs";import y from"./utils/compiler-listener.mjs";import $ from"./utils/has-pkg.mjs";import{empty as v,resolveProgramPath as _}from"./utils/index.mjs";import P from"./utils/progress.mjs";import S from"./utils/sigint-exit.mjs";let{HotModuleReplacementPlugin:B,ProgressPlugin:D,WatchIgnorePlugin:T}=r,E=$("stylelint-webpack-plugin")&&(await import("stylelint-webpack-plugin")).default,F=$("eslint-webpack-plugin")&&(await import("eslint-webpack-plugin")).default,M=k&&(await import("@pmmmwh/react-refresh-webpack-plugin")).default,O=["js","jsx","ts","tsx","json","html","vue"],R=O.join(","),U=["css","scss","sass","less","ts","tsx","js","jsx"],q=U.join(","),A=["node_modules/","es/","lib/","umd/","docs/","coverage/","dist/"],C=new URLSearchParams({timeout:2e3,reload:!0,quiet:!0,noInfo:!0,overlay:!0,dynamicPublicPath:!0}).toString(),G=a.output.path;j&&(G=_(`${x?"docs":"dist"}/client`));let I=m(a,{entry:{main:[`webpack-hot-middleware/client?name=client&path=//localhost:${c}/__hmr__&${C}`]},output:{path:G},module:w(!1),plugins:[new B,new T({paths:[/\.d\.ts$/]}),M&&new M,F&&new F({fix:!0,threads:!0,files:[`${p.alias["@"]}/**/*.{${R}}`,x&&`${p.alias["@pkg"]}/**/*.{${R}}`].filter(Boolean),extensions:O,exclude:A,cache:!0,lintDirtyModulesOnly:!0}),E&&new E({fix:!0,threads:!0,files:[`${p.alias["@"]}/**/*.{${q}}`,x&&`${p.alias["@pkg"]}/**/*.{${q}}`].filter(Boolean),extensions:U,exclude:A,cache:!0,lintDirtyModulesOnly:!0}),p.bar&&new D({handler(e,t,...o){let i=p.bar;P(e,i.name||"Build",o.length?`[${t}] ${o.join(" ")}`:"",i.color)}})].filter(Boolean)}),L=[I];j&&L.push(m(a,n));let[z,H]=r(L).compilers;z.hooks.done.tap("client",e=>{d(null,e)});let J=o(),K=i(),N=s(z,{writeToDisk:!1,index:"index.html",headers:()=>u,serverSideRender:j});if(J.use(N),J.use(l(z,{log:!1,path:"/__hmr__",heartbeat:2e3,ignoreUnaccepted:!1,ignoreDeclined:!0,ignoreErrored:!0})),p.proxy&&h(J,p.proxy),e(g.mockPath)){let e=f(g.mockPath);J.use(e)}let Q=`${I.output.path}/index.html`;J.all("/*",K.any(),function(e,t,o){if("GET"!==e.method)return o();{let e=N.context.outputFileSystem,o=e?.readFileSync?.(Q);t.end(o)}});let V=[y("client",z)];H&&(H.watch({aggregateTimeout:20,ignored:b.dev_watch_ignored,poll:1e3,stdin:!0},d),V.push(y("server",H))),await Promise.all(V);let W=J.listen(c,()=>{});process.on("exit",function(){W.close(v),W.closeAllConnections(),t(g.cachePath)}),S(()=>{process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.10.1",
3
+ "version": "3.10.3",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -24,12 +24,12 @@
24
24
  "core-js": "3.35.1",
25
25
  "core-js-compat": "3.35.1",
26
26
  "cross-env": "7.0.3",
27
- "css-loader": "6.9.1",
27
+ "css-loader": "6.10.0",
28
28
  "express": "4.18.2",
29
29
  "html-webpack-plugin": "5.6.0",
30
30
  "http-proxy-middleware": "2.0.6",
31
31
  "less": "4.2.0",
32
- "less-loader": "12.1.0",
32
+ "less-loader": "12.2.0",
33
33
  "lightningcss": "1.23.0",
34
34
  "mini-css-extract-plugin": "2.7.7",
35
35
  "mock-json-schema": "1.1.1",
@@ -52,7 +52,7 @@
52
52
  "@types/multer": "1.4.11",
53
53
  "oxlint": "0.2.6",
54
54
  "sass": "1.70.0",
55
- "sass-loader": "14.0.0"
55
+ "sass-loader": "14.1.0"
56
56
  },
57
57
  "files": [
58
58
  "lib",