CH-J Toolsserverio valdymas per SSH
Meniu
Paskelbtas šaltinis

CH-J Tools

Naršyti aplankus ir failus konkrečiai programai išleisti.

Atsisiųsti šaltinį ZIP
CH-J / Server Manager 1704 failai
0.1.2-beta Pridėta: · Pastatytas:
core-bridge.ts Pridėta: Data neregistruota 3,9 KB · 101 eilutės
Kodas Atsiųsti failą
1import { keychain } from "../core/vault";
2/**
3 * Main-window bridge: exposes the frozen `window.chjCore` object with exactly the
4 * method names and semantics of the Electron 0.1.0 `corePreload.js`, implemented on
5 * top of the CH-J API. The unchanged renderer (`src/ui/app.js`) uses it as before.
6 */
7import { core } from "../index";
8import { bootInfo } from "./boot";
9import { installWindowChrome } from "./windowChrome";
10import { installActivityReporter } from "./activity";
12const { app, config, vault, biometrics, profiles, availability, ssh, diagnostics, updates, modules, standby } = core;
13const boot = bootInfo();
15const chjCore = Object.freeze({
16 platform: boot.platform,
17 diagnostics: Object.freeze({
18 resolve: diagnostics.resolve,
19 start: diagnostics.start,
20 cancel: diagnostics.cancel,
21 get: diagnostics.get,
22 history: diagnostics.history,
23 removeHistory: diagnostics.removeHistory,
24 export: diagnostics.export,
25 copy: diagnostics.copy,
26 import: diagnostics.import,
27 onProgress: diagnostics.onProgress
28 }),
29 getInfo: app.getInfo,
30 openLegalDocument: app.openLegalDocument,
31 getConfig: config.get,
32 updateConfig: config.update,
33 getLanguageCatalogs: config.catalogs,
34 getLanguages: config.languages,
35 listPlugins: modules.list,
36 getPluginState: modules.getState,
37 checkPluginCatalog: modules.checkCatalog,
38 installPlugin: modules.install,
39 uninstallPlugin: modules.uninstall,
40 openPlugin: modules.open,
41 setModuleArea: modules.setArea,
42 detachModule: modules.detach,
43 collapseModule: modules.collapse,
44 closeModule: modules.close,
45 onModuleActivate: modules.onActivate,
46 onPluginWindowState: modules.onWindowState,
47 keychain,
48 getStandbyHelper: standby.get,
49 setStandbyHelper: standby.set,
50 onGeneratorUnlockRequested: (callback: (event: unknown) => void) => subscribe("generator:unlockRequested", callback),
51 onKeychainChanged: (callback: (event: unknown) => void) => subscribe("keychain:changed", callback),
52 getVaultStatus: vault.status,
53 createVault: vault.create,
54 unlockVault: vault.unlock,
55 lockVault: vault.lock,
56 resetVault: vault.reset,
57 getBiometricStatus: biometrics.status,
58 enableBiometrics: biometrics.enable,
59 disableBiometrics: biometrics.disable,
60 unlockVaultWithBiometrics: biometrics.unlock,
61 autoUnlockVaultWithBiometrics: biometrics.autoUnlock,
62 authenticateSensitiveAction: biometrics.authenticate,
63 onVaultLocked: (callback: (payload: unknown) => void) => subscribeVault(callback),
64 listProfiles: profiles.list,
65 exportProfiles: profiles.export,
66 previewProfileImport: profiles.previewImport,
67 commitProfileImport: profiles.commitImport,
68 cancelProfileImport: profiles.cancelImport,
69 saveProfile: profiles.save,
70 deleteProfile: profiles.delete,
71 selectPrivateKey: profiles.selectPrivateKey,
72 listAvailability: availability.list,
73 refreshAvailability: availability.refresh,
74 onAvailabilityChanged: availability.onChanged,
75 listSshSessions: ssh.list,
76 connectSsh: ssh.connect,
77 trustSshHostKey: ssh.trustHostKey,
78 disconnectSsh: ssh.disconnect,
79 sendTerminalInput: ssh.input,
80 suggestTerminal: ssh.suggest,
81 getTerminalDictionary: ssh.dictionary,
82 saveTerminalDictionary: ssh.saveDictionary,
83 resizeTerminal: ssh.resize,
84 getUpdateState: updates.getState,
85 checkForUpdates: updates.check,
86 selectUpdateRelease: updates.select,
87 downloadUpdate: updates.download,
88 installUpdate: updates.install,
89 revealUpdate: updates.reveal,
90 onUpdateState: updates.onState,
91 onSshData: ssh.onData,
92 onSshState: ssh.onState,
93 onSshError: ssh.onError
94});
96import { subscribe } from "../transport";
97function subscribeVault(callback: (payload: unknown) => void) { return subscribe("vault:locked", callback); }
99Object.defineProperty(window, "chjCore", { value: chjCore, writable: false, configurable: false, enumerable: true });
100installWindowChrome(boot.platform, [".window-titlebar"], () => [document]);
101installActivityReporter();
SHA-25622a3c8bd4d80e12fe5ae495df79b078d8e4a9d09960a2bfdf8c3f5d9bff6941c

CH-J Proprietary Software License 1.14 · Šaltinis pateiktas pagal CH-J Proprietary Software License 1.14. Jo prieinamumas nekeičia licencijos sąlygų ir nesuteikia papildomų teisių.

Archyvas SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
Failai