index.ts 1.11 KB
/**
 * host 独占运行时(shell 专用)。
 *
 * 这里放的不是「可复制的库」,是**一份运行时状态**:
 *   - http.ts 的 axios 实例 + _signInitPromise + _unauthorizedHandler
 *   - PEM 虚拟模块注入的私钥 / 公钥与 5 个 VITE_* 配置
 *   - AccessProvider 的 createContext
 *   - queryClient 单例
 *   - useAppStore 的模块级 create()
 *
 * wujie 的 iframe 会把它们各自复制一份:签名状态三份、Context 两个对象、
 * 401 handler 各注册各的。因此本包禁止被任何子应用 import,
 * 由 eslint 的 no-restricted-imports 与 scripts/check-boundaries.mjs 双重拦住。
 *
 * 子应用请使用 @uj/platform-sdk:它通过 props.request 把这唯一一份能力代理出去。
 */
export * from './api/core/config';
export * from './api/core/sign';
export * from './api/core/types';
export * from './api/core/http';
export * from './api/core/client';
export * from './api/core/token';
export * from './queryClient';
export * from './access';
export * from './store/useAppStore';
export * from './api/modules/auth';
export * from './api/modules/menu';