CH-J Server Managerspráva serverů přes SSH
Menu
Vydané zdroje

CH-J Server Manager

Procházejte adresáře a soubory konkrétního vydání aplikace.

Stáhnout zdroje ZIP
CH-J / Server Manager 339 souborů
core-20261014T184258Z-3fbed0b93fdf Přidáno: Datum není evidováno · Sestaveno:
Soubory
corePreload.js Přidáno: Datum není evidováno 4,7 KB · 78 řádků
Stáhnout soubor
1"use strict";
3const { contextBridge, ipcRenderer } = require("electron");
5function subscribe(channel, callback) {
6 if (typeof callback !== "function") return () => {};
7 const listener = (_event, payload) => callback(payload);
8 ipcRenderer.on(channel, listener);
9 return () => ipcRenderer.removeListener(channel, listener);
12async function biometricRequest(channel) {
13 const result = await ipcRenderer.invoke(channel);
14 if (!result.ok) throw Object.assign(new Error(result.error.message), { code: result.error.code });
15 return result.value;
18contextBridge.exposeInMainWorld("chjCore", Object.freeze({
19 platform: process.platform,
20 diagnostics: Object.freeze({
21 resolve: (options) => ipcRenderer.invoke("diagnostics:resolve", options),
22 start: (options) => ipcRenderer.invoke("diagnostics:start", options),
23 cancel: (id, tool) => ipcRenderer.invoke("diagnostics:cancel", { id, tool }),
24 get: (id) => ipcRenderer.invoke("diagnostics:get", { id }),
25 history: () => ipcRenderer.invoke("diagnostics:history"),
26 removeHistory: (id) => ipcRenderer.invoke("diagnostics:removeHistory", { id }),
27 export: (id, format) => ipcRenderer.invoke("diagnostics:export", { id, format }),
28 copy: (id, format = "txt") => ipcRenderer.invoke("diagnostics:copy", { id, format }),
29 import: () => ipcRenderer.invoke("diagnostics:import"),
30 onProgress: (callback) => subscribe("diagnostics:progress", callback)
31 }),
32 getInfo: () => ipcRenderer.invoke("core:getInfo"),
33 openLegalDocument: (document) => ipcRenderer.invoke("legal:open", { document }),
34 getConfig: () => ipcRenderer.invoke("config:get"),
35 updateConfig: (payload) => ipcRenderer.invoke("config:update", payload),
36 listPlugins: () => ipcRenderer.invoke("plugins:list"),
37 getPluginState: () => ipcRenderer.invoke("plugins:getState"),
38 checkPluginCatalog: () => ipcRenderer.invoke("plugins:checkCatalog"),
39 installPlugin: (releaseId) => ipcRenderer.invoke("plugins:install", { releaseId }),
40 uninstallPlugin: (pluginId) => ipcRenderer.invoke("plugins:uninstall", { pluginId }),
41 openPlugin: (pluginId) => ipcRenderer.invoke("plugins:open", { pluginId }),
42 onPluginWindowState: (callback) => subscribe("core:pluginWindowState", callback),
43 getVaultStatus: () => ipcRenderer.invoke("vault:status"),
44 createVault: (password) => ipcRenderer.invoke("vault:create", { password }),
45 unlockVault: (password) => ipcRenderer.invoke("vault:unlock", { password }),
46 lockVault: () => ipcRenderer.invoke("vault:lock"),
47 resetVault: (confirmation) => ipcRenderer.invoke("vault:reset", { confirmation }),
48 getBiometricStatus: () => biometricRequest("biometrics:status"),
49 enableBiometrics: () => biometricRequest("biometrics:enable"),
50 disableBiometrics: () => biometricRequest("biometrics:disable"),
51 unlockVaultWithBiometrics: () => biometricRequest("biometrics:unlock"),
52 authenticateSensitiveAction: () => biometricRequest("biometrics:authenticate"),
53 onVaultLocked: (callback) => subscribe("vault:locked", callback),
54 listProfiles: () => ipcRenderer.invoke("profiles:list"),
55 exportProfiles: (format, ids) => ipcRenderer.invoke("profiles:export", { format, ids }),
56 previewProfileImport: () => ipcRenderer.invoke("profiles:previewImport"),
57 commitProfileImport: (token, policy) => ipcRenderer.invoke("profiles:commitImport", { token, policy }),
58 cancelProfileImport: () => ipcRenderer.invoke("profiles:cancelImport"),
59 saveProfile: (payload) => ipcRenderer.invoke("profiles:save", payload),
60 deleteProfile: (id) => ipcRenderer.invoke("profiles:delete", { id }),
61 selectPrivateKey: () => ipcRenderer.invoke("profiles:selectPrivateKey"),
62 listSshSessions: () => ipcRenderer.invoke("ssh:list"),
63 connectSsh: (payload) => ipcRenderer.invoke("ssh:connect", payload),
64 trustSshHostKey: (payload) => ipcRenderer.invoke("ssh:trustHostKey", payload),
65 disconnectSsh: (sessionId) => ipcRenderer.invoke("ssh:disconnect", { sessionId }),
66 sendTerminalInput: (sessionId, data) => ipcRenderer.send("ssh:input", { sessionId, data }),
67 resizeTerminal: (sessionId, cols, rows) => ipcRenderer.invoke("ssh:resize", { sessionId, cols, rows }),
68 getUpdateState: () => ipcRenderer.invoke("updates:getState"),
69 checkForUpdates: () => ipcRenderer.invoke("updates:check"),
70 selectUpdateRelease: (id) => ipcRenderer.invoke("updates:select", { id }),
71 downloadUpdate: () => ipcRenderer.invoke("updates:download"),
72 installUpdate: () => ipcRenderer.invoke("updates:install"),
73 revealUpdate: () => ipcRenderer.invoke("updates:reveal"),
74 onUpdateState: (callback) => subscribe("core:updateState", callback),
75 onSshData: (callback) => subscribe("ssh:data", callback),
76 onSshState: (callback) => subscribe("ssh:state", callback),
77 onSshError: (callback) => subscribe("ssh:error", callback)
78}));
SHA-2560bd99debf223dc2b4dc059c6eeece44499e56cefe2b93090bd2d0e9b2dec180d

CH-J Proprietary Software License 1.14 · Zdroje jsou zveřejněny pod CH-J Proprietary Software License 1.14. Jejich dostupnost nemění licenční podmínky ani neposkytuje další oprávnění.

SHA-256 archivu3df08cf5e899262a6ce92d7ec2caf5c42b683f1f2b57055662b845ff7dde67a8