- 新增文档模板和导航结构 - 实现服务器基础API路由和控制器 - 添加扩展插件配置和前端框架 - 引入多租户和权限管理模块 - 集成日志和数据库配置 - 添加核心业务模型和类型定义
82 lines
2.1 KiB
TypeScript
82 lines
2.1 KiB
TypeScript
// @ts-nocheck
|
|
// This file is generated by Umi automatically
|
|
// DO NOT CHANGE IT MANUALLY!
|
|
import './core/polyfill';
|
|
|
|
import { renderClient } from 'D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/renderer-react';
|
|
import { getRoutes } from './core/route';
|
|
import { createPluginManager } from './core/plugin';
|
|
import { createHistory } from './core/history';
|
|
import { ApplyPluginsType } from 'umi';
|
|
|
|
|
|
const publicPath = "/";
|
|
const runtimePublicPath = false;
|
|
|
|
async function render() {
|
|
const pluginManager = createPluginManager();
|
|
const { routes, routeComponents } = await getRoutes(pluginManager);
|
|
|
|
// allow user to extend routes
|
|
await pluginManager.applyPlugins({
|
|
key: 'patchRoutes',
|
|
type: ApplyPluginsType.event,
|
|
args: {
|
|
routes,
|
|
routeComponents,
|
|
},
|
|
});
|
|
|
|
const contextOpts = pluginManager.applyPlugins({
|
|
key: 'modifyContextOpts',
|
|
type: ApplyPluginsType.modify,
|
|
initialValue: {},
|
|
});
|
|
|
|
const basename = contextOpts.basename || '/';
|
|
const historyType = contextOpts.historyType || 'browser';
|
|
|
|
const history = createHistory({
|
|
type: historyType,
|
|
basename,
|
|
...contextOpts.historyOpts,
|
|
});
|
|
|
|
return (pluginManager.applyPlugins({
|
|
key: 'render',
|
|
type: ApplyPluginsType.compose,
|
|
initialValue() {
|
|
const context = {
|
|
useStream: true,
|
|
routes,
|
|
routeComponents,
|
|
pluginManager,
|
|
mountElementId: 'root',
|
|
rootElement: contextOpts.rootElement || document.getElementById('root'),
|
|
publicPath,
|
|
runtimePublicPath,
|
|
history,
|
|
historyType,
|
|
basename,
|
|
__INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {"pureApp":false,"pureHtml":false},
|
|
callback: contextOpts.callback,
|
|
};
|
|
const modifiedContext = pluginManager.applyPlugins({
|
|
key: 'modifyClientRenderOpts',
|
|
type: ApplyPluginsType.modify,
|
|
initialValue: context,
|
|
});
|
|
return renderClient(modifiedContext);
|
|
},
|
|
}))();
|
|
}
|
|
|
|
|
|
render();
|
|
|
|
if (typeof window !== 'undefined') {
|
|
window.g_umi = {
|
|
version: '4.6.31',
|
|
};
|
|
}
|