@moneko/core 3.25.0 → 3.26.0-beta.1

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{program as r}from"commander";import{CONFIG as o}from"../config.mjs";let t=async()=>{try{let r=o.bundleId;if(!r)throw Error("请配置 bundleId");if(!/(^com\.)([a-zA-Z_][a-zA-Z0-9_]*[.])*([a-zA-Z_][a-zA-Z0-9_]*)$/.test(r)||3!==r.split(".").length)throw Error("软件包名不合法");let t=o.bundles;if(!t||0===t.length)throw Error("请配置 bundles (打包类型)");console.log(r,t)}catch{}};r.command("buildApp").description("编译将 h5 应用打包成移动客户端,使用 Flutter").action(t);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{spawn as e}from"child_process";import{join as o,relative as s}from"path";import{program as t}from"commander";import i from"./utils/setup-env.mjs";import{lesscCommonjs as r}from"./lessc.mjs";import{corePackageName as m,cwd as n,swcCachePath as l,runtimePath as c}from"./utils/config.mjs";import p from"./utils/setup-swcrc.mjs";import d from"./utils/require.mjs";import{__dirname as f}from"./file.mjs";import{deleteEmptyDirs as a,updateFileSync as u,removeDir as j,ink as $,println as y,scanFolderSync as g,removeFile as _}from"@moneko/utils";let b={stdio:"inherit",shell:!0};t.command("build <type> <framework>").description("编译项目").action(async(t,h,...x)=>{t||(y($(`type: 无效值 ${$(t,"245")}`,"red")),process.exit(1)),await i("production",t,h);let v=x[1].args.slice(2),C=!v.includes("no-docs"),w=!v.includes("no-lib"),E=!v.includes("no-es"),k=`${c} ${d.resolve(`${m}/lib/build.mjs`)}`;if("library"===t){let t=p(h),i=d.resolve("typescript/bin/tsc"),m=d.resolve("@swc/cli/bin/swc.js"),$=[w&&{type:"commonjs",dir:"lib",msg:"Convert to CommonJS"},E&&{type:"es6 -C jsc.target=es2015",dir:"es",msg:"Convert to ES Module"}].filter(Boolean),y=o(f,".types.json");$.length&&u(y,JSON.stringify({extends:s(f,o(n,"tsconfig.json")),include:[s(f,o(n,"components")),s(f,o(n,"typings"))],exclude:[s(f,o(n,"components/**/examples/*")),s(f,o(n,"components/**/__tests__/*")),s(f,o(n,"components/**/__mocks__/*"))]}));for(let s=0,p=$.length;s<p;s++){let p=o(n,`./${$[s].dir}`);j(p),e(`${c} ${m} components -d ${$[s].dir} -q --strip-leading-paths --config-file ${t} -C jsc.experimental.cacheRoot=${l} -C module.type=${$[s].type} -D --ignore "**/*.test.(js|ts)x?$"`,b).on("close",function(e){0===e&&(g(p,["README.mdx","examples","__*__"]).forEach(_),a(p),"commonjs"===$[s].type&&r())}),e(`${c} ${i} --project ${y} --outDir ${$[s].dir}`,b)}}("library"!==t||C&&"library"===t)&&e(k,b)});
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import{execSync as t}from"child_process";import{join as e}from"path";import{program as o}from"commander";import{cwd as r}from"./utils/config.mjs";import{updateFileSync as s}from"@moneko/utils";let i={feat:"✨ Features",fix:"🐛 Bug Fixes",docs:"📚 Documentation",style:"💎 Styles",refactor:"📦 Code Refactoring",perf:"🚀 Performance Improvements",test:"🚨 Tests",build:"🛠 Builds",ci:"⚙️ Continuous Integrations",chore:"♻️ Chores",revert:"🗑 Reverts"};function n(e,o){return function(t){let e=[];for(let o of t.trim().split("\n")){let[t,r,s,n,a]=o.split("|");if(a){let o=a.split(": "),l=i[o[0]];e.push({commitId:t,author:r,email:s,date:new Date(n).toLocaleString().replace(/\//g,"-"),message:l?o.slice(1).join(":"):a,type:l})}}return e}(t(`git log ${e?`${e}..`:""}${o||""} --format='%H|%an|%ae|%ad|%s'`,{encoding:"utf-8"}))}o.command("changelog <filename>").description("生成 CHANGELOG.md").action(o=>{let i=["# Change log"];try{t('git show-ref --quiet --verify "refs/heads/$(git rev-parse --abbrev-ref HEAD)";');let e=t('git config --get remote.origin.url | sed "s/\\.git$//"').toString().trim(),o=function(e){let o=t("git for-each-ref --sort='v:refname' --format '%(objectname) %(refname:short) %(creatordate:iso8601)' refs/tags",{encoding:"utf-8"}),r=[],s=o.trim().split("\n");return s.forEach((t,o)=>{let[i,n,a]=t.split(" "),l=s[o-1]?.split(" ")[1],c=`## ${n}`;l&&(c=`## [${n}](${e}/compare/${l}...${n}) (${new Date(a).toLocaleDateString().replace(/\//g,"-")})`),r.push({commitId:i,tag:n,date:a,title:c,logs:{}})}),r}(e);o.forEach((t,r)=>{if(r&&n(o[r-1].tag,t.tag).forEach(t=>{if(t.type){let s=o[r].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r].logs,{[t.type]:s})}}),r===o.length-1){let s=n(t.tag);s.length&&o.push({title:"## Last",logs:{}}),s.forEach(t=>{if(t.type){let s=o[r+1].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r+1].logs,{[t.type]:s})}})}}),o.reverse().forEach(t=>{for(let e in i.push(`
2
+ ${t.title}`),t.logs)Object.prototype.hasOwnProperty.call(t.logs,e)&&(i.push(`
3
+ ### ${e}
4
+ `),t.logs[e].forEach(t=>i.push(t)))})}catch{i.push("\n当前分支尚无任何提交\n")}s(e(r,o),i.join("\n"))});
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{join as o,relative as i}from"path";import{program as t}from"commander";import{runLint as n}from"./runlint.mjs";import{cachePath as r,cwd as e,runtimePath as m}from"./utils/config.mjs";import s from"./utils/require.mjs";t.command("eslint <soucre>").option("-o, --output-file").option("-f, --format").option("--color, --no-color").option("--fix").option("--fix-dry-run").option("--ext").description("js代码规范检查").action((t,c,l)=>{let p=o(s.resolve("eslint"),"../../bin/eslint.js");n(`${m} ${p} ${i(e,t)} --config ${i(e,"eslint.config.mjs")} ${l.parent.args.slice(2).join(" ")} --cache --cache-location "${r}/.eslintcache"`,"eslint")});
@@ -0,0 +1,17 @@
1
+ export declare const __filename: string;
2
+ export declare const __dirname: string;
3
+ /**
4
+ * 拷贝文件
5
+ * @param {String} source 源文件
6
+ * @param {String} target 目标文件
7
+ * @constructor
8
+ * */
9
+ export declare function copyFileSync(source: string, target: string): void;
10
+ /**
11
+ * 拷贝文件夹
12
+ * @param {String} source 源文件夹
13
+ * @param {String} target 目标文件夹
14
+ * @param {String} sun 是否子文件夹
15
+ * @constructor
16
+ * */
17
+ export declare function copyFolderRecursiveSync(source: string, target: string, sun?: boolean): void;
@@ -0,0 +1 @@
1
+ import{loadFileSync as o,saveFileSync as e}from"@moneko/utils";import{statSync as i,readdirSync as r}from"fs";import t from"path";import n from"url";export const __filename=n.fileURLToPath(import.meta.url);export const __dirname=t.dirname(__filename);export function copyFileSync(r,n){let c=o(r);if(null!==c){let o=n;i(n).isDirectory()&&(o=t.join(n,t.basename(r))),e(o,c)}}export function copyFolderRecursiveSync(o,e,n){let c=e;n&&(c=t.join(e,t.basename(o))),i(o).isDirectory()&&r(o).forEach(function(e){let r=t.join(o,e);i(r).isDirectory()?copyFolderRecursiveSync(r,c,!0):copyFileSync(r,c)})}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{program as o}from"commander";import{runLint as i}from"./runlint.mjs";o.command("githooks").description("git hooks工具").action((o,t)=>{let m="node_modules/.husky",n=t.args.map(o=>{let i=o.split("=");return`echo "${i[1]}" > ${m}/${i[0]}`}).join(" && ");i(`git init && husky ${m} && ${n}`,"githooks",[null])});
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import './version.mjs';
3
+ import './eslint.mjs';
4
+ import './stylelint.mjs';
5
+ import './build.mjs';
6
+ import './start.mjs';
7
+ import './build-app.mjs';
8
+ import './git-hooks.mjs';
9
+ import './changelog.mjs';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{program as i}from"commander";import"./version.mjs";import"./eslint.mjs";import"./stylelint.mjs";import"./build.mjs";import"./start.mjs";import"./build-app.mjs";import"./git-hooks.mjs";import"./changelog.mjs";i.option("-ig,--initgit","init git"),i.parse(process.argv),["SIGINT","SIGTERM","SIGQUIT"].forEach(i=>process.on(i,()=>{process.exit(0)}));
@@ -0,0 +1 @@
1
+ export declare function lesscCommonjs(): Promise<void>;
@@ -0,0 +1 @@
1
+ import{join as s}from"path";import{exec as e}from"child_process";import{runtimePath as o,corePackageName as t}from"./utils/config.mjs";import i from"./utils/require.mjs";import{loadFile as l,saveFile as r,scanFolderSync as m}from"@moneko/utils";let n="";function a(t){let l=s(i.resolve("less"),"../bin/lessc");return new Promise((s,i)=>{e(`${o} ${l} --js ${n} ${t} > ${t.replace(/\.less$/g,".css")}`,function(e){if(e)return i(e);s(!0)})})}let c=/\*?\.less/g;async function f(s){let e=await l(s);e&&c.test(e)&&await r(s,e.replace(c,".css"))}export async function lesscCommonjs(){let s=m("lib",["\\.less$"]),e=(await import(i.resolve(`${t}/lib/options/modify-vars.mjs`))).default;for(let s in e)Object.hasOwnProperty.call(e,s)&&(n+=`--modify-var="${s}=${e[s]}" `);Promise.all(s.map(a)),s.length&&Promise.all(m("lib",["\\.js$"]).map(f))}
@@ -0,0 +1,2 @@
1
+ import { StdioOptions } from 'child_process';
2
+ export declare const runLint: (shellSrc: string, pluginName: string, stdio?: StdioOptions) => never;
@@ -0,0 +1,2 @@
1
+ import{ink as t,print as s}from"@moneko/utils";import{spawnSync as e}from"child_process";export const runLint=(r,o,i="inherit")=>{let l=t(o,"cyan");s(l+": "+t("Runing...","yellow"),!0);let n=e(r,{stdio:i,shell:!0});s(l+": "+t(`✨ ${0!==n.status?"Error":"Successfully"}!
2
+ `,0!==n.status?"red":"green"),!0),process.exit(n.status||0)};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{spawn as e}from"child_process";import{program as i}from"commander";import{ink as o,println as r}from"@moneko/utils";import{corePackageName as m,runtimePath as t}from"./utils/config.mjs";import s from"./utils/setup-env.mjs";import p from"./utils/require.mjs";i.command("start <type> <framework>").description("运行项目").action(async(i,l,...n)=>{i||(r(o("type: 无效值 "+o(i,"245"),"red")),process.exit(1)),await s("development",i,l);let c=n[1].args.slice(2),f=c.indexOf("no-verify");-1!==f&&c.splice(f,1),e(`${t} ${p.resolve(`${m}/lib/dev.mjs`)}`,{stdio:"inherit",shell:!0})});
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{relative as o,join as t}from"path";import{program as i}from"commander";import{cachePath as s,cwd as e,runtimePath as n}from"./utils/config.mjs";import{runLint as r}from"./runlint.mjs";import l from"./utils/require.mjs";i.command("stylelint <soucre>").option("-o, --output-file").option("-f, --format").option("--color, --no-color").option("--fix").option("--fix-dry-run").option("--ext").description("css代码规范检查").action((i,c,m)=>{let p=t(l.resolve("stylelint"),"../../bin/stylelint.mjs");r(`${n} ${p} ${o(e,i)}/**/**/**/**/*.{less,css,scss,sass,style.ts,style.js} ${m.parent.args.slice(2).join(" ")} --cache --cache-location "${s}/.stylelintcache" --aei`,"stylelint")});
@@ -0,0 +1,2 @@
1
+ export declare function bundleApk(outputPath: string, outputBundleDir: string, type?: string): void;
2
+ export declare function bundleIOS(outputPath: string, outputBundleDir: string, type?: string): void;
@@ -0,0 +1 @@
1
+ import o from"path";import{renameSync as e}from"fs";import{execSync as n}from"child_process";import{bundleIpa as i,createDir as p,ink as l,print as t}from"@moneko/utils";export function bundleApk(i,a,u="-release"){t(l("正在编译 apk...","yellow"),!0),console.time("bundle apk "+u),n(`flutter build apk -${u}`),console.timeEnd("bundle apk "+u),p(a),e(o.join(i,`build/app/outputs/flutter-apk/app${u}.apk`),a),t("✨ "+l("Apk 编译","cyan")+": "+l("完成","cyan"),!0)}export function bundleIOS(a,u,r="-release"){t(l("正在编译 ipa...","yellow"),!0),console.time("bundle ipa "+r);let d=o.join(u,"Runner/Payload");n(`flutter build ios -${r} --no-codesign`),p(d),e(o.join(a,"build/ios/iphoneos/Runner.app"),d),i(o.join(u,"Runner"),u,r),console.timeEnd("bundle ipa "+r),t("✨ "+l("ipa 编译","cyan")+": "+l("完成","cyan"),!0)}
@@ -0,0 +1,6 @@
1
+ export declare const runtimePath: string;
2
+ export declare const cliVersion: any;
3
+ export declare const corePackageName = "@moneko/core";
4
+ export declare const cwd: string;
5
+ export declare const cachePath: string;
6
+ export declare const swcCachePath: string;
@@ -0,0 +1 @@
1
+ import{join as e,dirname as o}from"path";import{__dirname as c}from"../file.mjs";import t from"./require.mjs";let n=o(process.execPath);"win32"===process.platform&&n.includes(" ")&&(n=`"${n}"`);export const runtimePath=e(n,"undefined"!=typeof Deno?"deno":"undefined"!=typeof Bun?"bun":"node");export const cliVersion=t(e(c,"../package.json")).version;export const corePackageName="@moneko/core";export const cwd=process.cwd();export const cachePath=e(cwd,"node_modules/.cache");export const swcCachePath=e(cachePath,".swc");
@@ -0,0 +1,2 @@
1
+ declare const require: NodeRequire;
2
+ export default require;
@@ -0,0 +1 @@
1
+ import{createRequire as t}from"module";let e=t(import.meta.url);export default e;
@@ -0,0 +1,6 @@
1
+ declare function setupEnv(mode: string, type: string, framework: string): Promise<{
2
+ NODE_ENV: string;
3
+ APPTYPE: string;
4
+ FRAMEWORK: string;
5
+ }>;
6
+ export default setupEnv;
@@ -0,0 +1 @@
1
+ import{loadFile as e}from"@moneko/utils";async function t(t,r,n){let i=[".env",".env/.env",`.env/.${"production"===t?"prod":"dev"}.env`],o={NODE_ENV:t,APPTYPE:r,FRAMEWORK:n};return(await Promise.all(i.map(e))).forEach(e=>{e&&Object.assign(o,e.split("\n").reduce((e,t)=>{if(!t||t.trim().startsWith("#"))return e;let[r,...n]=t.split("=");if(!r)return e;let i=n.join("=").trim();return e[r.trim()]=i.replace(/^["']|["']$/g,""),e},{}))}),Object.keys(o).forEach(e=>{let t=o[e];process.env[e]!==t&&(process.env[e]=o[e])}),o}export default t;
@@ -0,0 +1,2 @@
1
+ declare function setupSwcRc(framework: 'react' | 'solid'): string;
2
+ export default setupSwcRc;
@@ -0,0 +1 @@
1
+ import{join as e}from"path";import{__dirname as o}from"../file.mjs";import r from"./require.mjs";import{updateFileSync as s}from"@moneko/utils";let m=e(o,".swcrc");export default function(e){let o="solid"===e;return s(m,JSON.stringify({$schema:"https://json.schemastore.org/swcrc",module:{type:"es6"},minify:!0,jsc:{minify:{mangle:!0,compress:!0,format:{comments:"some"}},parser:{syntax:"typescript",decorators:!0,dynamicImport:!0,tsx:!0},loose:!0,target:"es2022",externalHelpers:!1,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:"automatic",throwIfNamespace:!0,useBuiltins:!0,refresh:"react"===e,development:!1,importSource:o?"solid-js/h":void 0}},experimental:{plugins:[[r.resolve("@moneko/transform-imports"),{"@moneko/common":{transform:"@moneko/common/lib/${member}"},lodash:{transform:"lodash/${member}"},"@ant-design/icons":{transform:"es/icons/${member}"},antd:{transform:"es/${member}",memberTransformers:["dashed_case"]},"neko-ui":{transform:"es/${member}",memberTransformers:["dashed_case"]}}],o&&[r.resolve("@moneko/jsx-dom-expressions"),{moduleName:"solid-js/web",builtIns:["For","Show","Switch","Match","Suspense","SuspenseList","Portal","Index","Dynamic","ErrorBoundary"],contextToCustomElements:!0,wrapConditionals:!0,generate:"dom",hydratable:!1}]].filter(Boolean)}},sourceMaps:!0,exclude:["__tests__/","examples/"]})),m}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import{program as o}from"commander";import{cliVersion as m}from"./utils/config.mjs";o.version(m,"-v, --version");
package/lib/config.mjs CHANGED
@@ -1 +1 @@
1
- import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import n from"./paths.mjs";import{APPTYPE as s,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as l,isDev as a,isLibrary as m,isMobile as p,jsxImportSource as u,mainDirectory as c}from"./process-env.mjs";import{isFunction as d,resolveProgram as f}from"./utils/index.mjs";import h from"./utils/setup-env.mjs";import{fileExists as g}from"@moneko/utils";import x from"./utils/require.mjs";let v=["@app","@moneko","neko-ui",".cache/http/data","@ant-design","@antv","@antv/x6","@antv/x6-react-components","@element-plus","ant-design-vue","antd","antd-mini","antd-mobile","antd-mobile-icons","element-plus","element-ui","ng-zorro-antd","@antv","@mui","@du","ahooks","rc-queue-anim","umi","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design"];export function getConfig(e){return delete x.cache[e],new Promise(o=>{if(g(e)){let t=x(e).default;return o(d(t)?t(process):t)}return o({})})}let[P,w,C]=await Promise.all([h(r,s,i),getConfig(n.configPath),getConfig(n.customConfigPath)]),j={devtool:a?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,mode:"csr",bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:""},env:P,basename:"/",publicPath:"/",rem:{designSize:p?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":f(c)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:t,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:a,jsxImportSource:u,providerImportSource:`@moneko/${i}/mdx`},jsxDomExpressions:o,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:"solid"!==i};m&&(j.alias=Object.assign(j.alias,{"@pkg":n.componentsPath,[l]:n.componentsPath}));let b=j;(!1===(b=e(b,w,C)).devtool||!1===b.sourceMap)&&(b.sourceMap=!1,b.devtool=!1),b.fixBrowserRouter&&b.htmlPluginOption&&(b.htmlPluginOption.tags||(b.htmlPluginOption.tags=[]),b.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}));export const CONFIG=b;export const PUBLICPATH=CONFIG.publicPath;
1
+ import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import n from"./paths.mjs";import{APPTYPE as s,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as l,isDev as a,isLibrary as m,isMobile as p,jsxImportSource as u,mainDirectory as c}from"./process-env.mjs";import{isFunction as d,resolveProgram as f}from"./utils/index.mjs";import h from"./utils/setup-env.mjs";import{fileExists as g}from"@moneko/utils";import x from"./utils/require.mjs";let v=["@app","@moneko","neko-ui",".cache/http/data","@ant-design","@antv","@antv/x6","@antv/x6-react-components","@element-plus","ant-design-vue","antd","antd-mini","antd-mobile","antd-mobile-icons","element-plus","element-ui","ng-zorro-antd","@antv","@mui","@du","ahooks","rc-queue-anim","umi","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design"];export function getConfig(e){return delete x.cache[e],new Promise(o=>{if(g(e)){let t=x(e).default;return o(d(t)?t(process):t)}return o({})})}let[P,b,w]=await Promise.all([h(r,s,i),getConfig(n.configPath),getConfig(n.customConfigPath)]),C={devtool:a?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,mode:"csr",bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:""},env:P,basename:"/",publicPath:"/",rem:{designSize:p?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":f(c)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:t,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:a,jsxImportSource:u,providerImportSource:`@moneko/${i}/mdx`},jsxDomExpressions:o,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:"solid"!==i,bundleId:"com.moneko.bid",bundles:[]};m&&(C.alias=Object.assign(C.alias,{"@pkg":n.componentsPath,[l]:n.componentsPath}));let j=C;(!1===(j=e(j,b,w)).devtool||!1===j.sourceMap)&&(j.sourceMap=!1,j.devtool=!1),j.fixBrowserRouter&&j.htmlPluginOption&&(j.htmlPluginOption.tags||(j.htmlPluginOption.tags=[]),j.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}));export const CONFIG=j;export const PUBLICPATH=CONFIG.publicPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.25.0",
3
+ "version": "3.26.0-beta.1",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -9,6 +9,9 @@
9
9
  "build": "rm -rf ./lib && tsc && swc src -d lib --strip-leading-paths -D && node convert",
10
10
  "prepublishOnly": "npm run build"
11
11
  },
12
+ "bin": {
13
+ "mo": "./lib/bin/index.mjs"
14
+ },
12
15
  "keywords": [],
13
16
  "author": "moneko",
14
17
  "license": "MIT",
@@ -21,6 +24,7 @@
21
24
  "@typescript/vfs": "1.6.0",
22
25
  "browserslist": "4.24.2",
23
26
  "chokidar": "4.0.1",
27
+ "commander": "12.1.0",
24
28
  "core-js": "3.39.0",
25
29
  "core-js-compat": "3.39.0",
26
30
  "css-loader": "7.1.2",
@@ -125,6 +125,9 @@ interface CacheConfig extends FileCacheOptions, MemoryCacheOptions {
125
125
  type?: 'filesystem' | 'memory';
126
126
  }
127
127
  export declare type ConfigType = {
128
+ /** 软件包名称 */
129
+ bundleId?: string;
130
+ bundles?: ('apk -release' | 'apk -debug' | 'ios -release' | 'ios -debug')[];
128
131
  /**
129
132
  * @default true
130
133
  */