@moneko/core 3.11.1-beta.7 → 3.11.1-beta.9

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.mjs CHANGED
@@ -1 +1 @@
1
- import{removeDirAll as o}from"@moneko/mdx";import r from"webpack";import{merge as m}from"webpack-merge";import e from"./build/common.mjs";import i from"./build/server.mjs";import{CONFIG as s}from"./config.mjs";import n from"./module.config.mjs";import t from"./paths.mjs";import l from"./plugin/done.mjs";import{SSR as a}from"./process-env.mjs";import p from"./utils/log.mjs";import c from"./utils/seo.mjs";import f from"./utils/progress.mjs";import g from"chalk";let{ProgressPlugin:h}=r,u=[m(e,{module:n(!1),plugins:[s.done&&new l({done:s.done}),s.bar&&new h({handler(o,r,...m){let e=s.bar;f(o,e.name||"Build",m.length?`[${r}] ${m.join(" ")}`:"",e.color)}})].filter(Boolean)})];a&&u.push(m(e,i));let d=r(u);async function j(){d.run((o,r)=>{if(o)throw o;r?.hasErrors()&&console.log("csaca",r?.hasErrors())}),await new Promise(o=>{d.compilers[0].hooks.done.tapAsync("rundone",(r,m)=>{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("err0r:"+g.redBright(r.compilation.errors[o].message));m(),o(m)})}),s.seo&&c()}await j(),process.on("exit",function(){o(t.cachePath)});
1
+ import{removeDirAll as o}from"@moneko/mdx";import r from"webpack";import{merge as m}from"webpack-merge";import e from"./build/common.mjs";import i from"./build/server.mjs";import{CONFIG as t}from"./config.mjs";import s from"./module.config.mjs";import l from"./paths.mjs";import n from"./plugin/done.mjs";import{SSR as p}from"./process-env.mjs";import a from"./utils/compiler-listener.mjs";import f from"./utils/log.mjs";import c from"./utils/seo.mjs";import g from"./utils/progress.mjs";import h from"chalk";let{ProgressPlugin:u}=r,d=[m(e,{module:s(!1),plugins:[t.done&&new n({done:t.done}),t.bar&&new u({handler(o,r,...m){let e=t.bar;g(o,e.name||"Build",m.length?`[${r}] ${m.join(" ")}`:"",e.color)}})].filter(Boolean)})];p&&d.push(m(e,i));let j=r(d),[w,b]=j.compilers,k=[a("client",w)];async function B(){j.run((o,r)=>{if(o)throw o;if(r&&(r.hasErrors()||r.hasWarnings()))for(let o=0,m=r.stats.length;o<m;o++){let m=r.stats[o];for(let o=0,r=m.compilation.warnings.length;o<r;o++)f(h.yellowBright(m.compilation.warnings[o].message));for(let o=0,r=m.compilation.errors.length;o<r;o++)f(h.redBright(m.compilation.errors[o].message))}}),await Promise.all(k),t.seo&&c()}b&&k.push(a("server",b)),await B(),process.on("exit",function(){o(l.cachePath)});
@@ -0,0 +1 @@
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};
@@ -0,0 +1,6 @@
1
+ import loadModuleMeta from './load-module-meta.cjs';
2
+ declare const _default: {
3
+ coreJsVersion: any;
4
+ loadModuleMeta: typeof loadModuleMeta;
5
+ };
6
+ export default _default;
@@ -0,0 +1 @@
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(e)};
@@ -0,0 +1,2 @@
1
+ declare function loadModuleMeta(name: string): any;
2
+ export default loadModuleMeta;
@@ -20,7 +20,7 @@ type Any = any;
20
20
  * @param {T} data data
21
21
  * @returns {Promise} mockData
22
22
  */
23
- export declare const yApiSchemaMock: <T extends unknown>(option: YApiOptionBySchema, data?: T | undefined) => Promise<T>;
23
+ export declare const yApiSchemaMock: <T extends unknown>(option: YApiOptionBySchema, data?: T) => Promise<T>;
24
24
  export type YApiOption = {
25
25
  /** YApi host */
26
26
  host: string;
package/lib/index.d.mts CHANGED
@@ -13,4 +13,6 @@ export { default as jsxDomExpressions, type JsxDomExpressions, } from './options
13
13
  export { default as splitChunk, type OptimizationSplitChunksOptions, } from './options/split-chunk.mjs';
14
14
  export { default as Rule } from './rule.mjs';
15
15
  export type { VirtualModulePluginOption } from './plugin/virtual-module.mjs';
16
+ export declare const coreJsVersion: any;
17
+ export declare const loadModuleMeta: any;
16
18
  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,resolveNodeModulesPath,resolveProgramPath}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,resolveNodeModulesPath,resolveProgramPath}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";import o from"./cjs/index.cjs";let e=o.default;export const coreJsVersion=e.coreJsVersion;export const loadModuleMeta=e.loadModuleMeta;
@@ -1 +1 @@
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||{}));
1
+ import{merge as e}from"webpack-merge";import{CONFIG as r}from"../config.mjs";import o from"../paths.mjs";import{coreJsVersion as t}from"../index.mjs";import s from"../polyfills/polyfills.mjs";import{isDev as m,isReact as a,isSolid as p,jsxImportSource as i}from"../process-env.mjs";let l=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:s(),mode:"entry",coreJs:t};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:i},optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:o.swcCachePath,plugins:[["@moneko/transform-imports",l],p&&["@moneko/jsx-dom-expressions",{...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||{}));
@@ -0,0 +1,11 @@
1
+ import type { Compiler } from 'webpack';
2
+ export interface VirtualModulePluginOption {
3
+ [key: string]: string | object;
4
+ }
5
+ export declare class ExamplesWebpackPlugin {
6
+ private hasTapped;
7
+ private virtualModules;
8
+ constructor();
9
+ private modify;
10
+ apply(compiler: Compiler): void;
11
+ }
@@ -0,0 +1 @@
1
+ import t from"webpack-virtual-modules";import{node_modules as i}from"../utils/index.mjs";import{examples as e}from"../vm/example.mjs";export class ExamplesWebpackPlugin{constructor(){this.hasTapped=!1,this.virtualModules=new t}modify(t,e,s){let l=s||"",o=i(e),p=t?.inputFileSystem;for(;p&&p._inputFileSystem;)p=p._inputFileSystem;let a=p._virtualFiles[o];a&&a.contents===l||this.virtualModules.writeModule(o,l)}apply(t){this.virtualModules.apply(t);let i=this.modify.bind(this,t);e.on("change",i),t.hooks.compilation.tap("ExamplesWebpackPlugin",()=>{if(!this.hasTapped)for(let t of(this.hasTapped=!0,e))i(t[0],t[1])})}}
@@ -1 +1 @@
1
- import{Buffer as s}from"buffer";import{loadFileSync as t}from"@moneko/mdx";import{transform as i}from"lightningcss";import o from"webpack";let{sources:{RawSource:n,SourceMapSource:e},ModuleFilenameHelpers:{matchObject:r}}=o,a="lightning-css-minify",m=/\.css(?:\?.*)?$/i,{name:p,version:f}=JSON.parse(t(`${process.cwd()}/package.json`)||"{}");export class LightningCssMinifyPlugin{constructor(s={}){let{implementation:t,...o}=s;if(t&&"function"!=typeof t.transform)throw TypeError(`[LightningCssMinifyPlugin]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof t.transform}`);this.transform=t?.transform??i,this.options=o}apply(s){let t=JSON.stringify({name:p,version:f,options:this.options});s.hooks.compilation.tap(a,s=>{s.hooks.chunkHash.tap(a,(s,i)=>i.update(t)),s.hooks.processAssets.tapPromise({name:a,stage:s.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,additionalAssets:!0},async()=>await this.transformAssets(s)),s.hooks.statsPrinter.tap(a,s=>{s.hooks.print.for("asset.info.minimized").tap(a,(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:a,test:p,sourceMap:f=!!(i&&i.includes("source-map")),...c}=this.options,l=t.getAssets().filter(s=>!s.info.minimized&&(p||m).test(s.name)&&r({include:o,exclude:a},s.name));await Promise.all(l.map(async i=>{let o;let{source:r,map:a}=i.source.sourceAndMap(),m=r.toString(),p="string"==typeof r?s.from(r):r,l=this.transform({filename:i.name,code:p,minify:!0,sourceMap:f,...c}),g=l.code.toString();o=f?new e(g,i.name,JSON.parse(l.map.toString()),m,a,!0):new n(g),t.updateAsset(i.name,o,{...i.info,minimized:!0})}))}}
1
+ import{Buffer as s}from"buffer";import{transform as t}from"lightningcss";import i from"webpack";import{loadModuleMeta as n,paths as o}from"../index.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,...n}=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=n}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:n,exclude:o,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:n,exclude:o},s.name));await Promise.all(l.map(async i=>{let n;let{source:o,map:a}=i.source.sourceAndMap(),m=o.toString(),p="string"==typeof o?s.from(o):o,l=this.transform({filename:i.name,code:p,minify:!0,sourceMap:f,...c}),g=l.code.toString();n=f?new r(g,i.name,JSON.parse(l.map.toString()),m,a,!0):new e(g),t.updateAsset(i.name,n,{...i.info,minimized:!0})}))}}
@@ -1 +1 @@
1
- import t from"webpack-virtual-modules";import{isLibrary as o}from"../process-env.mjs";import{node_modules as e}from"../utils/index.mjs";import{comment as i,docs as s}from"../vm/docs.mjs";import{examples as l}from"../vm/example.mjs";import{locales as r}from"../vm/locales.mjs";import m from"../vm/modules.mjs";import{route as p}from"../vm/routes.mjs";export class VirtualModuleWebpackPlugin{constructor(o={}){let i={};for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t)){let s=o[t];Object.assign(i,{[e(t)]:"string"==typeof s?s:`export default ${JSON.stringify(s)}`})}this.hasTapped=!1,this.virtualModules=new t({...m,...i})}modify(t,o,i){let s=i||"",l=e(o),r=t?.inputFileSystem;for(;r&&r._inputFileSystem;)r=r._inputFileSystem;let m=r._virtualFiles[l];m&&m.contents===s||this.virtualModules.writeModule(l,s)}apply(t){this.virtualModules.apply(t);let e=this.modify.bind(this,t);p.on("change",e),r.on("change",e),o&&(l.on("change",e),s.on("change",e),i.on("change",e)),t.hooks.compilation.tap("VirtualModuleWebpackPlugin",()=>{if(!this.hasTapped){for(let t of(this.hasTapped=!0,l))e(t[0],t[1]);for(let t of s)e(t[0],t[1]);for(let t of i)e(t[0],t[1])}})}}
1
+ import o from"webpack-virtual-modules";import{isLibrary as t}from"../process-env.mjs";import{node_modules as e}from"../utils/index.mjs";import{comment as i,docs as s}from"../vm/docs.mjs";import{examples as l}from"../vm/example.mjs";import{locales as r}from"../vm/locales.mjs";import m from"../vm/modules.mjs";import{route as p}from"../vm/routes.mjs";export class VirtualModuleWebpackPlugin{constructor(t={}){let i={};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let s=t[o];Object.assign(i,{[e(o)]:"string"==typeof s?s:`export default ${JSON.stringify(s)}`})}this.hasTapped=!1,this.virtualModules=new o({...m,...i})}modify(o,t,i){let s=i||"",l=e(t),r=o?.inputFileSystem;for(;r&&r._inputFileSystem;)r=r._inputFileSystem;let m=r._virtualFiles[l];m&&m.contents===s||console.log("update :",l),this.virtualModules.writeModule(l,s)}apply(o){this.virtualModules.apply(o);let e=this.modify.bind(this,o);p.on("change",e),r.on("change",e),t&&(l.on("change",e),s.on("change",e),i.on("change",e)),o.hooks.compilation.tap("VirtualModuleWebpackPlugin",()=>{if(!this.hasTapped){for(let o of(this.hasTapped=!0,l))e(o[0],o[1]);for(let o of s)e(o[0],o[1]);for(let o of i)e(o[0],o[1])}})}}
@@ -1,3 +1,2 @@
1
- export declare const coreJsVersion: any;
2
1
  declare function polyfills(): string[];
3
2
  export default polyfills;
@@ -1 +1 @@
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}
1
+ import r from"core-js-compat";import{getBrowsersTargets as t}from"./targets.mjs";import{coreJsVersion as o}from"../index.mjs";export default function(){return r({targets:t(),version:o}).list}
@@ -1 +1 @@
1
- import{fileExists as o}from"@moneko/mdx";import{resolveNodeModulesPath as m}from"./index.mjs";export default function(r){return o(m(`${r}/package.json`))}
1
+ import{loadModuleMeta as r}from"../index.mjs";export default function(t){try{return r(`${t}/package.json`),!0}catch(r){return!1}}
@@ -10,7 +10,7 @@ export declare function resolveProgramPath<T extends string>(src: T): ProgramPat
10
10
  * @param {string} src 路径
11
11
  * @returns {string} 位于项目根目录node_modules下的位置
12
12
  */
13
- export declare const resolveNodeModulesPath: <T extends string>(src: T) => `${`node_modules/${T extends string ? T : string}` extends infer T_1 ? T_1 extends `node_modules/${T extends string ? T : string}` ? T_1 extends string ? T_1 : string : never : never}`;
13
+ export declare const resolveNodeModulesPath: <T extends string>(src: T) => NodeModulesPath<T>;
14
14
  export declare function node_modules<T extends string>(name: T): `node_modules/${T}`;
15
15
  /** 获取模块真实入口位置
16
16
  * @param {string} url 路径
package/lib/vm/info.mjs CHANGED
@@ -1 +1 @@
1
- import{loadFileSync as e}from"@moneko/mdx";import{CONFIG as r}from"../config.mjs";import{APPTYPE as o,PACKAGENAME as t,PACKAGEVERSION as s,SSR as i}from"../process-env.mjs";import{resolveProgramPath as p,toUpperCaseString as m}from"../utils/index.mjs";let{description:n,author:a,repository:c,keywords:d}=JSON.parse(e(p("package.json"))||"{}"),f="string"==typeof a,l={name:t,projectName:m(t).replace(/-/g," "),ssr:i,version:s,base:r.basename,type:o,routerMode:r.routerMode,prefixCls:r.prefixCls,theme:r.theme,description:n,author:f?{name:a}:a,repository:f?{url:c}:c};export const description=n;export const keywords=Array.isArray(d)?d.toString():"";export default l;
1
+ import{CONFIG as r}from"../config.mjs";import{APPTYPE as e,PACKAGENAME as o,PACKAGEVERSION as t,SSR as s}from"../process-env.mjs";import{toUpperCaseString as i}from"../utils/index.mjs";import{loadModuleMeta as p,paths as m}from"../index.mjs";let{description:n,author:a,repository:c,keywords:d}=p(`${m.programPath}/package.json`),f="string"==typeof a,l={name:o,projectName:i(o).replace(/-/g," "),ssr:s,version:t,base:r.basename,type:e,routerMode:r.routerMode,prefixCls:r.prefixCls,theme:r.theme,description:n,author:f?{name:a}:a,repository:f?{url:c}:c};export const description=n;export const keywords=Array.isArray(d)?d.toString():"";export default l;
@@ -1 +1 @@
1
- import{join as m}from"path";import{getAppEntry as o,getAppFallback as e,getAppMdxScope as r,getAppMergeRouter as p,getAppNormalizeCss as t,getAppPrefixRouter as a,getAppRem as s,getAppSuspense as i}from"@moneko/mdx";import f from"./coverage.mjs";import{docs as n,docsModuleName as l}from"./docs.mjs";import{exampleModuleName as c,examples as x}from"./example.mjs";import d from"./info.mjs";import{locales as g,localesModuleName as j}from"./locales.mjs";import{route as u,routesModuleName as h}from"./routes.mjs";import{CONFIG as v}from"../config.mjs";import D from"../paths.mjs";import{APPTYPE as k,FRAMEWORK as z}from"../process-env.mjs";import{node_modules as b,resolveProgramPath as y}from"../utils/index.mjs";let C={[b("@app/info")]:`export default ${JSON.stringify(d)}`,[b("@app/entry")]:o(m(v.alias["@"],"./index.ts"),!!v.rem,!!v.normalizeCss,k,z),[b("@app/rem")]:s(v.rem?.designSize||1680),[b("@app/fallback")]:e(v.fallbackCompPath),[b("@app/coverage")]:f(D.coveragePath),[b("@app/merge-router")]:p(),[b("@app/prefix-router")]:a(),[b("@app/normalize/index.css")]:t(),[b("@app/suspense/index.tsx")]:i(k,z),[b("@app/mdx-scope")]:r(y("site/mdx-scope.ts")),[b(h)]:u.getData(h),[b(j)]:g.getData(j),[b(l)]:n.getData(l),[b(c)]:x.getData(c)};export default C;
1
+ import{join as m}from"path";import{getAppEntry as o,getAppFallback as e,getAppMdxScope as r,getAppMergeRouter as p,getAppNormalizeCss as t,getAppPrefixRouter as a,getAppRem as s,getAppSuspense as i}from"@moneko/mdx";import f from"./coverage.mjs";import{docs as n,docsModuleName as l}from"./docs.mjs";import{exampleModuleName as c,examples as x}from"./example.mjs";import d from"./info.mjs";import{locales as g,localesModuleName as j}from"./locales.mjs";import{route as u,routesModuleName as h}from"./routes.mjs";import{CONFIG as v}from"../config.mjs";import D from"../paths.mjs";import{APPTYPE as k,FRAMEWORK as z}from"../process-env.mjs";import{node_modules as b,resolveProgramPath as y}from"../utils/index.mjs";let C={[b("@app/info")]:`export default ${JSON.stringify(d)}`,[b("@app/entry")]:o(m(v.alias["@"],"./index.ts"),!!v.rem,!!v.normalizeCss,k,z),[b("@app/rem")]:s(v.rem?.designSize||1680),[b("@app/fallback")]:e(v.fallbackCompPath),[b("@app/coverage")]:f(D.coveragePath),[b("@app/merge-router")]:p(),[b("@app/prefix-router")]:a(),[b("@app/normalize/index.css")]:t(),[b("@app/suspense/index.tsx")]:i(k,z),[b("@app/mdx-scope")]:r(y("site/mdx-scope.ts")),[b(c)]:x.getData(c),[b(h)]:u.getData(h),[b(j)]:g.getData(j),[b(l)]:n.getData(l)};export default C;
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.11.1-beta.7",
3
+ "version": "3.11.1-beta.9",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "build": "rm -rf ./lib && tsc && swc src -d lib --strip-leading-paths -D",
9
- "postbuild": "npm run cjs && npm run mjs",
10
- "cjs": "find ./lib/loader/ -type f -name \"*.js\" -execdir bash -c 'mv \"$1\" \"${1%.js}.cjs\"' _ {} \\;",
11
- "mjs": "find ./lib/ -type f -name \"*.js\" -execdir bash -c 'mv \"$1\" \"${1%.js}.mjs\"' _ {} \\;"
8
+ "build": "rm -rf ./lib && tsc && swc src -d lib --strip-leading-paths -D && node convert"
12
9
  },
13
10
  "keywords": [],
14
11
  "author": "moneko",
@@ -16,14 +13,14 @@
16
13
  "dependencies": {
17
14
  "@moneko/mdx": "0.1.26",
18
15
  "@moneko/transform-imports": "0.4.0",
19
- "@swc/core": "1.4.12",
16
+ "@swc/core": "1.4.14",
20
17
  "add-asset-html-webpack-plugin": "6.0.0",
21
18
  "browserslist": "4.23.0",
22
19
  "chalk": "5.3.0",
23
20
  "chokidar": "3.6.0",
24
21
  "core-js": "3.36.1",
25
22
  "core-js-compat": "3.36.1",
26
- "css-loader": "7.0.0",
23
+ "css-loader": "7.1.1",
27
24
  "enhanced-resolve": "5.16.0",
28
25
  "express": "4.19.2",
29
26
  "html-webpack-plugin": "5.6.0",
@@ -34,12 +31,12 @@
34
31
  "mini-css-extract-plugin": "2.8.1",
35
32
  "mock-json-schema": "1.1.1",
36
33
  "multer": "1.4.5-lts.1",
37
- "style-loader": "3.3.4",
34
+ "style-loader": "4.0.0",
38
35
  "swc-loader": "0.2.6",
39
36
  "terser-webpack-plugin": "5.3.10",
40
- "typescript": "5.3.3",
37
+ "typescript": "5.4.5",
41
38
  "webpack": "5.91.0",
42
- "webpack-bundle-analyzer": "4.10.1",
39
+ "webpack-bundle-analyzer": "4.10.2",
43
40
  "webpack-dev-middleware": "7.2.1",
44
41
  "webpack-hot-middleware": "2.26.1",
45
42
  "webpack-merge": "5.10.0",
@@ -51,8 +48,8 @@
51
48
  "@swc/cli": "0.3.12",
52
49
  "@types/express": "4.17.21",
53
50
  "@types/multer": "1.4.11",
54
- "sass": "1.74.1",
55
- "sass-loader": "14.1.1"
51
+ "sass": "1.75.0",
52
+ "sass-loader": "14.2.0"
56
53
  },
57
54
  "files": [
58
55
  "lib",