@moneko/core 3.10.5 → 3.11.0-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/dev/mock.d.mts
CHANGED
|
@@ -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
|
|
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/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||{}));
|
|
@@ -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/lib/utils/index.d.mts
CHANGED
|
@@ -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) =>
|
|
13
|
+
export declare const resolveNodeModulesPath: <T extends string>(src: T) => NodeModulesPath<T>;
|
|
14
14
|
/** 获取模块真实入口位置
|
|
15
15
|
* @param {string} url 路径
|
|
16
16
|
* @returns {string} 模块真实入口路径
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0-beta.0",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"prebuild": "oxlint -c ./eslintrc.json -D correctness -D restriction src",
|
|
9
8
|
"build": "rm -rf ./lib && tsc && swc src -d lib --strip-leading-paths -D",
|
|
10
9
|
"postbuild": "npm run cjs && npm run mjs",
|
|
11
10
|
"cjs": "find ./lib/loader/ -type f -name \"*.js\" -execdir bash -c 'mv \"$1\" \"${1%.js}.cjs\"' _ {} \\;",
|
|
@@ -16,28 +15,28 @@
|
|
|
16
15
|
"license": "MIT",
|
|
17
16
|
"dependencies": {
|
|
18
17
|
"@moneko/mdx": "0.1.26",
|
|
19
|
-
"@moneko/transform-imports": "0.
|
|
20
|
-
"@swc/core": "1.
|
|
18
|
+
"@moneko/transform-imports": "0.4.0",
|
|
19
|
+
"@swc/core": "1.4.11",
|
|
21
20
|
"add-asset-html-webpack-plugin": "6.0.0",
|
|
22
21
|
"chalk": "5.3.0",
|
|
23
22
|
"chokidar": "3.6.0",
|
|
24
|
-
"core-js": "3.36.
|
|
25
|
-
"core-js-compat": "3.36.
|
|
23
|
+
"core-js": "3.36.1",
|
|
24
|
+
"core-js-compat": "3.36.1",
|
|
26
25
|
"cross-env": "7.0.3",
|
|
27
26
|
"css-loader": "6.10.0",
|
|
28
|
-
"express": "4.
|
|
27
|
+
"express": "4.19.2",
|
|
29
28
|
"html-webpack-plugin": "5.6.0",
|
|
30
29
|
"http-proxy-middleware": "2.0.6",
|
|
31
30
|
"less": "4.2.0",
|
|
32
31
|
"less-loader": "12.2.0",
|
|
33
|
-
"lightningcss": "1.
|
|
34
|
-
"mini-css-extract-plugin": "2.8.
|
|
32
|
+
"lightningcss": "1.24.1",
|
|
33
|
+
"mini-css-extract-plugin": "2.8.1",
|
|
35
34
|
"mock-json-schema": "1.1.1",
|
|
36
35
|
"multer": "1.4.5-lts.1",
|
|
37
36
|
"style-loader": "3.3.4",
|
|
38
37
|
"swc-loader": "0.2.6",
|
|
39
|
-
"typescript": "5.
|
|
40
|
-
"webpack": "5.90.
|
|
38
|
+
"typescript": "5.4.3",
|
|
39
|
+
"webpack": "5.90.3",
|
|
41
40
|
"webpack-bundle-analyzer": "4.10.1",
|
|
42
41
|
"webpack-dev-middleware": "7.0.0",
|
|
43
42
|
"webpack-hot-middleware": "2.26.1",
|
|
@@ -47,16 +46,18 @@
|
|
|
47
46
|
"xml2js": "0.6.2"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@swc/cli": "0.3.
|
|
49
|
+
"@swc/cli": "0.3.12",
|
|
51
50
|
"@types/express": "4.17.21",
|
|
52
51
|
"@types/multer": "1.4.11",
|
|
53
|
-
"
|
|
54
|
-
"sass": "1.
|
|
55
|
-
"sass-loader": "14.1.0"
|
|
52
|
+
"sass": "1.72.0",
|
|
53
|
+
"sass-loader": "14.1.1"
|
|
56
54
|
},
|
|
57
55
|
"files": [
|
|
58
56
|
"lib",
|
|
59
57
|
"typings/global.d.ts",
|
|
60
58
|
"typings/bundle-analyzer.d.ts"
|
|
61
|
-
]
|
|
59
|
+
],
|
|
60
|
+
"resolutions": {
|
|
61
|
+
"@types/mime": "3.0.4"
|
|
62
|
+
}
|
|
62
63
|
}
|