CH-J ToolsSSH के ज़रिए सर्वर प्रबंधन
मेनू
प्रकाशित सोर्स

CH-J Tools

किसी विशेष ऐप्लिकेशन रिलीज़ की डायरेक्टरी और फ़ाइलें देखें।

सोर्स ZIP डाउनलोड करें
CH-J / Server Manager 1704 फ़ाइलें
0.1.2-beta जोड़ा गया: · बिल्ड किया गया:
profiles.ts जोड़ा गया: तारीख दर्ज नहीं 1.5 KB · 17 पंक्तियाँ
कोड फ़ाइल डाउनलोड करें
1/** Server profiles, private-key selection and the portable profile format (chj-server-profiles v1). */
2import { call } from "../transport";
3import type { ProfileInput, ServerProfile } from "../types";
5export interface ImportPreviewRow { name: string; host: string; username: string; port: number; duplicate: boolean }
6export type ImportPreview = { canceled: true } | { canceled: false; token: string; format: "json" | "csv"; servers: ImportPreviewRow[] };
8export const profiles = Object.freeze({
9 list: () => call<ServerProfile[]>("core_profiles_list", "profiles:list"),
10 save: (payload: ProfileInput) => call<ServerProfile>("core_profiles_save", "profiles:save", payload),
11 delete: (id: string) => call<{ removed: boolean }>("core_profiles_delete", "profiles:delete", { id }),
12 selectPrivateKey: () => call<{ canceled: boolean; path: string | null }>("core_profiles_select_private_key", "profiles:selectPrivateKey"),
13 export: (format: "json" | "csv", ids?: string[]) => call<{ canceled: boolean; count?: number }>("core_profiles_export", "profiles:export", { format, ids }),
14 previewImport: () => call<ImportPreview>("core_profiles_preview_import", "profiles:previewImport"),
15 commitImport: (token: string, policy: "skip" | "update" | "create") => call<{ created: number; updated: number; skipped: number }>("core_profiles_commit_import", "profiles:commitImport", { token, policy }),
16 cancelImport: () => call<{ canceled: true }>("core_profiles_cancel_import", "profiles:cancelImport")
17});
SHA-2569ffe04017ef0b1de9f8cc80a8604c1543004491c499e8f8f4f550de1c9142a12

CH-J Proprietary Software License 1.14 · सोर्स CH-J Proprietary Software License 1.14 के तहत उपलब्ध कराया जाता है। इसकी उपलब्धता लाइसेंस की शर्तें नहीं बदलती और न ही अतिरिक्त अधिकार देती है।

आर्काइव SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
फ़ाइलें