webssh2-server
Version:
A Websocket to SSH2 gateway using xterm.js, socket.io, ssh2
16 lines (15 loc) • 530 B
JavaScript
import webssh2Client from 'webssh2_client';
import { DEFAULTS } from './constants.js';
import { createNamespacedDebug } from './logger.js';
const debug = createNamespacedDebug('client-path');
export function getClientPublicPath() {
try {
// Explicitly type the module to help TypeScript
const client = webssh2Client;
return client.getPublicPath();
}
catch (err) {
debug('Falling back to DEFAULTS.WEBSSH2_CLIENT_PATH:', err.message);
return DEFAULTS.WEBSSH2_CLIENT_PATH;
}
}