mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
removed uuid dependency from api package
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
const { getLogger } = require('dbgate-tools');
|
||||
const uuidv1 = require('uuid/v1');
|
||||
const { getSshTunnel } = require('./sshTunnel');
|
||||
const logger = getLogger('sshTunnelProxy');
|
||||
|
||||
@@ -22,7 +21,7 @@ function handleGetSshTunnelResponse({ msgid, response }, subprocess) {
|
||||
|
||||
async function getSshTunnelProxy(connection) {
|
||||
if (!process.send) return getSshTunnel(connection);
|
||||
const msgid = uuidv1();
|
||||
const msgid = crypto.randomUUID();
|
||||
process.send({ msgtype: 'getsshtunnel-request', msgid, connection });
|
||||
return new Promise((resolve, reject) => {
|
||||
dispatchedMessages[msgid] = { resolve, reject };
|
||||
|
||||
Reference in New Issue
Block a user