@moneko/core 3.11.2 → 3.11.4
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/utils/dts.d.mts +1 -0
- package/lib/utils/dts.mjs +1 -0
- package/lib/utils/seo.mjs +1 -1
- package/lib/vm/modules.mjs +1 -1
- package/package.json +7 -6
- package/typings/global.d.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateDeclaration(source: string, filename?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"typescript";import{createSystem as t,createDefaultMapFromNodeModules as i,createVirtualTypeScriptEnvironment as a}from"@typescript/vfs";import n from"./log.mjs";export function generateDeclaration(r,s="index.ts"){let c={declaration:!0,emitDeclarationOnly:!0,target:e.ScriptTarget.ESNext},g=i(c);g.set(s,r);let o=a(t(g),[s],e,c),l=o.languageService.getEmitOutput(s),m=l.outputFiles.reduce((e,t)=>e+=t.text,"");return l.emitSkipped&&(n("编译失败"),o.languageService.getCompilerOptionsDiagnostics().concat(o.languageService.getSyntacticDiagnostics(s)).concat(o.languageService.getSemanticDiagnostics(s)).forEach(t=>{if(t.file){let{line:i,character:a}=e.getLineAndCharacterOfPosition(t.file,t.start),r=e.flattenDiagnosticMessageText(t.messageText,"\n");n(`${t.file.fileName} (${i+1}, ${a+1}): ${r}`)}else n(e.flattenDiagnosticMessageText(t.messageText,"\n"))})),m}
|
package/lib/utils/seo.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as m}from"path";import{saveFileSync as o,scanRouter as t,sitemap as r}from"@moneko/mdx";import{resolveProgram as e}from"./index.mjs";import{outputConfig as p}from"../common.mjs";import{CONFIG as i}from"../config.mjs";import{routeDir as s}from"../paths.mjs";import{isLibrary as f}from"../process-env.mjs";export default(()=>{let{domain:n,
|
|
1
|
+
import{join as m}from"path";import{saveFileSync as o,scanRouter as t,sitemap as r}from"@moneko/mdx";import{resolveProgram as e}from"./index.mjs";import{outputConfig as p}from"../common.mjs";import{CONFIG as i}from"../config.mjs";import{routeDir as s}from"../paths.mjs";import{isLibrary as f}from"../process-env.mjs";export default(()=>{let{domain:n,jekyll:a,path:j}=i.seo||{},l=j&&e(j)||p?.path;if(!n||!l)return;let x=`https://${n}${i.basename}`;o(m(l,"CNAME"),n),o(m(l,"robots"),`Sitemap: ${x}/sitemap.txt`),o(m(l,"sitemap.txt"),r(s,x,t(s,f)).join("\n")),a||o(m(l,".nojekyll"),"")});
|
package/lib/vm/modules.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as
|
|
1
|
+
import{join as o}from"path";import{getAppEntry as e,getAppFallback as p,getAppMdxScope as r,getAppMergeRouter as m,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 c from"./info.mjs";import{locales as d,localesModuleName as g}from"./locales.mjs";import{route as x,routesModuleName as j}from"./routes.mjs";import{CONFIG as u}from"../config.mjs";import v from"../paths.mjs";import{APPTYPE as h,FRAMEWORK as k}from"../process-env.mjs";import{node_modules as y,resolveProgram as z}from"../utils/index.mjs";import{generateDeclaration as D}from"../utils/dts.mjs";let S={[y("@app/env")]:`export default ${JSON.stringify(u.env)}`,[y("@app/info")]:`export default ${JSON.stringify(c)}`,[y("@app/entry")]:e(o(u.alias["@"],"./index.ts"),!!u.rem,!!u.normalizeCss,h,k),[y("@app/rem")]:s(u.rem?.designSize||1680),[y("@app/fallback")]:p(u.fallbackCompPath),[y("@app/coverage")]:f(v.coveragePath),[y("@app/merge-router")]:m(),[y("@app/prefix-router")]:a(),[y("@app/normalize/index.css")]:t(),[y("@app/suspense/index.tsx")]:i(h,k),[y("@app/mdx-scope")]:r(z("site/mdx-scope.ts")),[y(j)]:x.getData(j),[y(g)]:d.getData(g),[y(l)]:n.getData(l)};console.log(D(S[y("@app/env")]));export default S;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.4",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@moneko/mdx": "0.1.26",
|
|
15
15
|
"@moneko/transform-imports": "0.4.0",
|
|
16
|
-
"@swc/core": "1.4.
|
|
16
|
+
"@swc/core": "1.4.17",
|
|
17
|
+
"@typescript/vfs": "1.5.0",
|
|
17
18
|
"add-asset-html-webpack-plugin": "6.0.0",
|
|
18
19
|
"browserslist": "4.23.0",
|
|
19
20
|
"chalk": "5.3.0",
|
|
20
21
|
"chokidar": "3.6.0",
|
|
21
|
-
"core-js": "3.
|
|
22
|
-
"core-js-compat": "3.
|
|
22
|
+
"core-js": "3.37.0",
|
|
23
|
+
"core-js-compat": "3.37.0",
|
|
23
24
|
"css-loader": "7.1.1",
|
|
24
25
|
"dotenv": "16.4.5",
|
|
25
26
|
"enhanced-resolve": "5.16.0",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"less": "4.2.0",
|
|
30
31
|
"less-loader": "12.2.0",
|
|
31
32
|
"lightningcss": "1.24.1",
|
|
32
|
-
"mini-css-extract-plugin": "2.
|
|
33
|
+
"mini-css-extract-plugin": "2.9.0",
|
|
33
34
|
"mock-json-schema": "1.1.1",
|
|
34
35
|
"multer": "1.4.5-lts.1",
|
|
35
36
|
"style-loader": "4.0.0",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
52
53
|
"@types/webpack-hot-middleware": "2.25.9",
|
|
53
54
|
"sass": "1.75.0",
|
|
54
|
-
"sass-loader": "14.2.
|
|
55
|
+
"sass-loader": "14.2.1"
|
|
55
56
|
},
|
|
56
57
|
"files": [
|
|
57
58
|
"lib",
|
package/typings/global.d.ts
CHANGED
|
@@ -315,9 +315,9 @@ export declare type ConfigType = {
|
|
|
315
315
|
/** 添加 .nojekyll 文件
|
|
316
316
|
* @description 告诉网站部署平台当前网站不是基于 Jekyll 构建的,
|
|
317
317
|
* 不要忽略掉下划线开头的文件和文件夹
|
|
318
|
-
* @default
|
|
318
|
+
* @default false
|
|
319
319
|
**/
|
|
320
|
-
|
|
320
|
+
jekyll?: boolean;
|
|
321
321
|
/** 文件输出路径 */
|
|
322
322
|
path?: string;
|
|
323
323
|
}
|