공개된 소스
소스 ZIP 다운로드
CH-J Server Manager
특정 애플리케이션 릴리스의 디렉터리와 파일을 살펴보세요.
CH-J / Server Manager
377 개 파일
core-20261019T111616Z-160a00bfcddc
추가됨: · 빌드됨:
1
"use strict";3
const { contextBridge, ipcRenderer } = require("electron");5
function 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);10
}12
async 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;16
}18
contextBridge.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
autoUnlockVaultWithBiometrics: () => biometricRequest("biometrics:autoUnlock"),53
authenticateSensitiveAction: () => biometricRequest("biometrics:authenticate"),54
onVaultLocked: (callback) => subscribe("vault:locked", callback),55
listProfiles: () => ipcRenderer.invoke("profiles:list"),56
exportProfiles: (format, ids) => ipcRenderer.invoke("profiles:export", { format, ids }),57
previewProfileImport: () => ipcRenderer.invoke("profiles:previewImport"),58
commitProfileImport: (token, policy) => ipcRenderer.invoke("profiles:commitImport", { token, policy }),59
cancelProfileImport: () => ipcRenderer.invoke("profiles:cancelImport"),60
saveProfile: (payload) => ipcRenderer.invoke("profiles:save", payload),61
deleteProfile: (id) => ipcRenderer.invoke("profiles:delete", { id }),62
selectPrivateKey: () => ipcRenderer.invoke("profiles:selectPrivateKey"),63
listSshSessions: () => ipcRenderer.invoke("ssh:list"),64
connectSsh: (payload) => ipcRenderer.invoke("ssh:connect", payload),65
trustSshHostKey: (payload) => ipcRenderer.invoke("ssh:trustHostKey", payload),66
disconnectSsh: (sessionId) => ipcRenderer.invoke("ssh:disconnect", { sessionId }),67
sendTerminalInput: (sessionId, data) => ipcRenderer.send("ssh:input", { sessionId, data }),68
resizeTerminal: (sessionId, cols, rows) => ipcRenderer.invoke("ssh:resize", { sessionId, cols, rows }),69
getUpdateState: () => ipcRenderer.invoke("updates:getState"),70
checkForUpdates: () => ipcRenderer.invoke("updates:check"),71
selectUpdateRelease: (id) => ipcRenderer.invoke("updates:select", { id }),72
downloadUpdate: () => ipcRenderer.invoke("updates:download"),73
installUpdate: () => ipcRenderer.invoke("updates:install"),74
revealUpdate: () => ipcRenderer.invoke("updates:reveal"),75
onUpdateState: (callback) => subscribe("core:updateState", callback),76
onSshData: (callback) => subscribe("ssh:data", callback),77
onSshState: (callback) => subscribe("ssh:state", callback),78
onSshError: (callback) => subscribe("ssh:error", callback)79
}));SHA-256
7e8c81808ecc89bd320caabc35cdc255a2ba80e0df12b252412dcfa119b2f722CH-J Proprietary Software License 1.14 · 소스는 CH-J Proprietary Software License 1.14에 따라 제공됩니다. 소스를 공개한다고 해서 라이선스 조항이 바뀌거나 추가 권리가 부여되지는 않습니다.
압축 파일 SHA-256
a9605c0870a223b6a8542bb0705edd51d8b04f3069582653417a8397fabcc09a