MCPcopy Create free account
hub / github.com/PIKACHUIM/CFWorkerACME / BootstrapState

Interface BootstrapState

frontend/src/stores/useBootstrapStore.ts:14–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12import { fetchBootstrap, type BootstrapInfo } from '@api/system';
13
14interface BootstrapState {
15 info: BootstrapInfo | null;
16 loading: boolean;
17 error: string | null;
18 /** 应用启动时调用;若已加载则不重复请求。 */
19 ensureLoaded: () => Promise<void>;
20 /** 主动刷新(初始化完成、系统配置保存后)。 */
21 refresh: () => Promise<void>;
22}
23
24async function loadOnce(set: (s: Partial<BootstrapState>) => void) {
25 set({ loading: true, error: null });

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected