@moneko/core 3.10.4 → 3.10.6
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.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
|
|
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 c}from"./config.mjs";import{PORT as p,devLog as d,headers as u}from"./dev/config.mjs";import h from"./dev/mock.mjs";import f 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 $ from"./rule.mjs";import b from"./utils/compiler-listener.mjs";import y 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:C}=r,L=y("stylelint-webpack-plugin")&&(await import("stylelint-webpack-plugin")).default,T=y("eslint-webpack-plugin")&&(await import("eslint-webpack-plugin")).default,E=k&&(await import("@pmmmwh/react-refresh-webpack-plugin")).default,F=["js","jsx","ts","tsx","json","html","vue"],M=F.join(","),O=["css","scss","sass","less","ts","tsx","js","jsx"],R=O.join(","),U=["node_modules/","es/","lib/","umd/","docs/","coverage/","dist/"],q=new URLSearchParams({timeout:2e3,reload:!0,quiet:!0,noInfo:!0,overlay:!0,dynamicPublicPath:!0}).toString(),A=a.output.path;j&&(A=_(`${x?"docs":"dist"}/client`));let G=m(a,{entry:{main:[`webpack-hot-middleware/client?name=client&path=//localhost:${p}/__hmr__&${q}`]},output:{path:A},module:w(!1),plugins:[new B,new C({paths:[/\.d\.ts$/]}),E&&new E,T&&new T({fix:!0,threads:!0,files:[`${c.alias["@"]}/**/*.{${M}}`,x&&`${c.alias["@pkg"]}/**/*.{${M}}`].filter(Boolean),extensions:F,exclude:U,cache:!0,cacheLocation:`${g.lineCachePath}/.eslintcache`,lintDirtyModulesOnly:!0}),L&&new L({fix:!0,threads:!0,files:[`${c.alias["@"]}/**/*.{${R}}`,x&&`${c.alias["@pkg"]}/**/*.{${R}}`].filter(Boolean),extensions:O,exclude:U,cache:!0,cacheLocation:`${g.lineCachePath}/.stylelintcache`,lintDirtyModulesOnly:!0}),c.bar&&new D({handler(e,t,...o){let i=c.bar;P(e,i.name||"Build",o.length?`[${t}] ${o.join(" ")}`:"",i.color)}})].filter(Boolean)}),I=[G];j&&I.push(m(a,n));let[z,H]=r(I).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})),c.proxy&&f(J,c.proxy),e(g.mockPath)){let e=h(g.mockPath);J.use(e)}let Q=`${G.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=[b("client",z)];H&&(H.watch({aggregateTimeout:20,ignored:$.dev_watch_ignored,poll:1e3,stdin:!0},d),V.push(b("server",H))),await Promise.all(V);let W=J.listen(p,()=>{});process.on("exit",function(){W.close(v),W.closeAllConnections(),t(g.cachePath)}),S(()=>{process.exit(1)});
|
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 t from"../polyfills/polyfills.mjs";import{isDev 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";let i=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||{}),c={include:t(),mode:"entry",coreJs:s};export default(t=>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:[["@moneko/transform-imports",i],l&&["@moneko/jsx-dom-expressions",{...r.jsxDomExpressions,generate:t?"ssr":"dom",hydratable:t}]].filter(Boolean)}},env:r.polyfill?c:void 0,sourceMaps:!0,parseMap:!0},"function"==typeof r.swcrc?r.swcrc(m):r.swcrc||{}));
|
package/lib/paths.d.mts
CHANGED
package/lib/paths.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"url";let o=JSON.parse(process.env.npm_config_argv||'{"original":[]}').original;export const yarnArgv={};for(let e=0,t=o.length;e<t;e++){let t=o[e].split("=");Object.assign(yarnArgv,{[t[0]]:t[1]||!0})}export const CUSTOMCONFIG=process.env.npm_config_config||yarnArgv.config;let t=process.cwd(),c=`${t}/node_modules`,a={nodeModules:c,corePath:e.fileURLToPath(new URL(".",import.meta.url)),programPath:t,webpackCachePath:`${c}/.temp_cache`,cachePath:`${c}/.cache/.mo`,httpCachePath:`${c}/.cache/http`,swcCachePath:`${c}/.swc`,configPath:`${t}/config/index.ts`,customConfigPath:`${t}/config/${CUSTOMCONFIG}.ts`,coveragePath:`${t}/coverage/clover.xml`,pagesPath:`${t}/src/pages`,componentsPath:`${t}/components`,mockPath:`${t}/mock`};export const routeDir="library"===process.env.APPTYPE?a.componentsPath:a.pagesPath;export default a;
|
|
1
|
+
import e from"url";let o=JSON.parse(process.env.npm_config_argv||'{"original":[]}').original;export const yarnArgv={};for(let e=0,t=o.length;e<t;e++){let t=o[e].split("=");Object.assign(yarnArgv,{[t[0]]:t[1]||!0})}export const CUSTOMCONFIG=process.env.npm_config_config||yarnArgv.config;let t=process.cwd(),c=`${t}/node_modules`,a={nodeModules:c,corePath:e.fileURLToPath(new URL(".",import.meta.url)),programPath:t,webpackCachePath:`${c}/.temp_cache`,cachePath:`${c}/.cache/.mo`,httpCachePath:`${c}/.cache/http`,swcCachePath:`${c}/.swc`,configPath:`${t}/config/index.ts`,customConfigPath:`${t}/config/${CUSTOMCONFIG}.ts`,coveragePath:`${t}/coverage/clover.xml`,pagesPath:`${t}/src/pages`,componentsPath:`${t}/components`,mockPath:`${t}/mock`,lineCachePath:`${c}/.cache`};export const routeDir="library"===process.env.APPTYPE?a.componentsPath:a.pagesPath;export default a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"webpack";import r from"./external-remotes.mjs";import{CONFIG as t}from"../config.mjs";import{realResolve as o}from"../utils/index.mjs";let{NormalModuleReplacementPlugin:s,container:{ModuleFederationPlugin:a}}=e,
|
|
1
|
+
import e from"webpack";import r from"./external-remotes.mjs";import{CONFIG as t}from"../config.mjs";import{realResolve as o}from"../utils/index.mjs";let{NormalModuleReplacementPlugin:s,container:{ModuleFederationPlugin:a}}=e,i={},m={},n={},l=t.moduleFederation?.map(e=>{if(Array.isArray(e.remotes))for(let r=0,t=e.remotes.length;r<t;r++){let t=e.remotes[r],o=t.alias||t.name,s=t.filename||"remote_entry.js";if(n[o]=`${t.name}@${t.host}/${s}`,Array.isArray(t.library))for(let e=0,r=t.library.length;e<r;e++)i[t.library[e]]=`${o}/${t.library[e]}`}if(Array.isArray(e.exposes))for(let r=0,t=e.exposes.length;r<t;r++){let t=e.exposes[r];"string"==typeof t?m[`./${t.toString()}`]=o(t):"[object Object]"===Object.prototype.toString.call(t)&&(m[`./${t.name}`]=o(t.path))}return new a({filename:"remote_entry.js",...e,remotes:n,exposes:m})});l.length>0&&(l.push(new r),l.push(new s(/(.*)/,e=>{i[e.request]&&(e.request=i[e.request])})));export default l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"core-js-compat";import{getBrowsersTargets as r}from"./targets.mjs";import{resolve as e}from"path";import{loadFileSync as t}from"@moneko/mdx";let{version:s}=JSON.parse(t(e("node_modules/core-js/package.json"))||"{}");export const coreJsVersion=s.substring(0,s.indexOf(".",2));export default function(){return o({targets:r(),version:coreJsVersion}).list}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.6",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@swc/cli": "0.3.9",
|
|
51
51
|
"@types/express": "4.17.21",
|
|
52
52
|
"@types/multer": "1.4.11",
|
|
53
|
-
"oxlint": "0.2.
|
|
53
|
+
"oxlint": "0.2.9",
|
|
54
54
|
"sass": "1.71.0",
|
|
55
55
|
"sass-loader": "14.1.0"
|
|
56
56
|
},
|