/** * webapi/flowMonitor.ts — 镜像 web 端 flowMonitor.ts (v0.11+ Phase 2) * * 镜像 web/apps/jnpf-web-apps-main/src/api/workFlow/flowMonitor.ts 8 函数: * getFlowMonitorList / delMonitorList / getLogList / cancel / assign / * resurgence / getPauseType */ import { JnpfClient } from '../core/client.ts' import { loadWebModule } from './_loader.ts' const FLOW_MONITOR_SRC = '/home/ubuntu/ccWorkDir/web/apps/jnpf-web-apps-main/src/api/workFlow/flowMonitor.ts' let cached: any = null export async function initWebapi(client: JnpfClient): Promise { if (cached) return const { initDefHttpShim } = await import('./_defhttp_shim.ts') initDefHttpShim(client) cached = await loadWebModule(FLOW_MONITOR_SRC) } export function isWebapiLoaded(): boolean { return cached !== null } export const loadFlowMonitor: any = new Proxy({} as any, { get(_target, prop) { if (!cached) throw new Error('flowMonitor 模块未初始化, 请先 await initWebapi(client)') return cached[prop] }, })