123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- /**
- * Namespace Env
- *
- * It is used to declare the type of the import.meta object
- */
- declare namespace Env {
- /** The router history mode */
- type RouterHistoryMode = 'hash' | 'history' | 'memory';
- /** Interface for import.meta */
- // eslint-disable-next-line @typescript-eslint/no-shadow
- interface ImportMeta extends ImportMetaEnv {
- /** The environment */
- readonly VITE_OSS_BASE_URL: string;
- /** The base url of the application */
- readonly VITE_BASE_URL: string;
- /** The title of the application */
- readonly VITE_APP_TITLE: string;
- /** The description of the application */
- readonly VITE_APP_DESC: string;
- /** The router history mode */
- readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
- /** The prefix of the iconify icon */
- readonly VITE_ICON_PREFIX: 'icon';
- /**
- * The prefix of the local icon
- *
- * This prefix is start with the icon prefix
- */
- readonly VITE_ICON_LOCAL_PREFIX: 'icon-local';
- /** backend service base url */
- readonly VITE_SERVICE_BASE_URL: string;
- /**
- * success code of backend service
- *
- * when the code is received, the request is successful
- */
- readonly VITE_SERVICE_SUCCESS_CODE: string;
- /**
- * logout codes of backend service
- *
- * when the code is received, the user will be logged out and redirected to login page
- *
- * use "," to separate multiple codes
- */
- readonly VITE_SERVICE_LOGOUT_CODES: string;
- /**
- * modal logout codes of backend service
- *
- * when the code is received, the user will be logged out by displaying a modal
- *
- * use "," to separate multiple codes
- */
- readonly VITE_SERVICE_MODAL_LOGOUT_CODES: string;
- /**
- * token expired codes of backend service
- *
- * when the code is received, it will refresh the token and resend the request
- *
- * use "," to separate multiple codes
- */
- readonly VITE_SERVICE_EXPIRED_TOKEN_CODES: string;
- /** when the route mode is static, the defined super role */
- readonly VITE_STATIC_SUPER_ROLE: string;
- /**
- * other backend service base url
- *
- * the value is a json
- */
- readonly VITE_OTHER_SERVICE_BASE_URL: string;
- /**
- * Whether to enable the http proxy
- *
- * Only valid in the development environment
- */
- readonly VITE_HTTP_PROXY?: CommonType.YesOrNo;
- /**
- * The auth route mode
- *
- * - Static: the auth routes is generated in front-end
- * - Dynamic: the auth routes is generated in back-end
- */
- readonly VITE_AUTH_ROUTE_MODE: 'static' | 'dynamic';
- /**
- * The home route key
- *
- * It only has effect when the auth route mode is static, if the route mode is dynamic, the home route key is
- * defined in the back-end
- */
- readonly VITE_ROUTE_HOME: import('@elegant-router/types').LastLevelRouteKey;
- /**
- * Default menu icon if menu icon is not set
- *
- * Iconify icon name
- */
- readonly VITE_MENU_ICON: string;
- /** Whether to build with sourcemap */
- readonly VITE_SOURCE_MAP?: CommonType.YesOrNo;
- /**
- * Iconify api provider url
- *
- * If the project is deployed in intranet, you can set the api provider url to the local iconify server
- *
- * @link https://docs.iconify.design/api/providers.html
- */
- readonly VITE_ICONIFY_URL?: string;
- /** Used to differentiate storage across different domains */
- readonly VITE_STORAGE_PREFIX?: string;
- /** Whether to automatically detect updates after configuring application packaging */
- readonly VITE_AUTOMATICALLY_DETECT_UPDATE?: CommonType.YesOrNo;
- /** show proxy url log in terminal */
- readonly VITE_PROXY_LOG?: CommonType.YesOrNo;
- /** The launch editor */
- readonly VITE_DEVTOOLS_LAUNCH_EDITOR?: import('vite-plugin-vue-devtools').VitePluginVueDevToolsOptions['launchEditor'];
- }
- }
- interface ImportMeta {
- readonly env: Env.ImportMeta;
- }
|