ssh-tunneling
Advanced tools
Comparing version 1.1.18 to 1.1.19
import { Client as SshClient, ConnectConfig as SshConnectConfig } from 'ssh2'; | ||
import logger from './logger'; | ||
import { getAvailablePort } from './utils'; | ||
export declare enum STATUS { | ||
@@ -75,2 +76,2 @@ INIT = 0, | ||
} | ||
export { logger, SshTunnel }; | ||
export { logger, SshTunnel, getAvailablePort }; |
@@ -29,3 +29,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SshTunnel = exports.logger = exports.STATUS = void 0; | ||
exports.getAvailablePort = exports.SshTunnel = exports.logger = exports.STATUS = void 0; | ||
const net = __importStar(require("net")); | ||
@@ -37,2 +37,3 @@ const ssh2_1 = require("ssh2"); | ||
const utils_1 = require("./utils"); | ||
Object.defineProperty(exports, "getAvailablePort", { enumerable: true, get: function () { return utils_1.getAvailablePort; } }); | ||
var STATUS; | ||
@@ -39,0 +40,0 @@ (function (STATUS) { |
export declare const checkPortAvailable: (port: number) => Promise<unknown>; | ||
/** | ||
* @description check whether port is idle and then return another idle port if the port pass in is unavailable | ||
*/ | ||
export declare const getAvailablePort: (port: number) => any; | ||
export declare function padRight(str: string, length: number, padStr?: string): string; | ||
export declare function padLeft(str: string, length: number, padStr?: string): string; |
@@ -24,2 +24,5 @@ "use strict"; | ||
exports.checkPortAvailable = checkPortAvailable; | ||
/** | ||
* @description check whether port is idle and then return another idle port if the port pass in is unavailable | ||
*/ | ||
const getAvailablePort = async (port) => { | ||
@@ -26,0 +29,0 @@ if (port > 65535) { |
{ | ||
"private": false, | ||
"name": "ssh-tunneling", | ||
"version": "1.1.18", | ||
"version": "1.1.19", | ||
"description": "a ssh-tunneling client for nodejs", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -20,3 +20,3 @@ # Ssh tunneling for nodejs | ||
### `new SshTunel(config)` | ||
### `new SshTunnel(config)` | ||
@@ -23,0 +23,0 @@ options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45741
857