CH-J Tools通过 SSH 管理服务器
菜单
已发布的源代码

CH-J Tools

浏览特定应用版本的目录和文件。

下载源代码 ZIP
CH-J / Server Manager 1704 个文件
0.1.2-beta 添加时间: · 构建时间:
diagnostics.ts 添加时间: 未记录日期 1.4 KB · 18 行
代码 下载文件
1/** Local network diagnostics (runs on the desktop, not over SSH). */
2import { call, subscribe } from "../transport";
3import type { Payload, Result } from "../types";
5export type ExportFormat = "json" | "csv" | "txt";
7export const diagnostics = Object.freeze({
8 resolve: (options: Payload) => call<Result<unknown>>("core_diagnostics_resolve", "diagnostics:resolve", options),
9 start: (options: Payload) => call<Result<{ id: string; report: unknown }>>("core_diagnostics_start", "diagnostics:start", options),
10 cancel: (id: string, tool?: string) => call<Result<unknown>>("core_diagnostics_cancel", "diagnostics:cancel", { id, tool }),
11 get: (id: string) => call<Result<unknown>>("core_diagnostics_get", "diagnostics:get", { id }),
12 history: () => call<Result<unknown[]>>("core_diagnostics_history", "diagnostics:history"),
13 removeHistory: (id?: string) => call<Result<unknown>>("core_diagnostics_remove_history", "diagnostics:removeHistory", { id }),
14 export: (id: string, format: ExportFormat) => call<Result<{ canceled: boolean }>>("core_diagnostics_export", "diagnostics:export", { id, format }),
15 copy: (id: string, format: ExportFormat = "txt") => call<Result<{ copied: true }>>("core_diagnostics_copy", "diagnostics:copy", { id, format }),
16 import: () => call<Result<{ canceled?: boolean; id?: string }>>("core_diagnostics_import", "diagnostics:import"),
17 onProgress: (callback: (event: Payload) => void) => subscribe("diagnostics:progress", callback)
18});
SHA-2569e951a6d4b7fea2b9eb9fbe448e9c0c95ec5b73d3f9d516da043323b0afc3d43

CH-J Proprietary Software License 1.14 · 源代码依据 CH-J Proprietary Software License 1.14 提供。公开源代码不会改变许可条款,也不会授予额外权利。

压缩包 SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
文件