From 5e75a8ae407586ce09960264e3477117a967bc9a Mon Sep 17 00:00:00 2001 From: Shahnawaz-Sk Date: Wed, 26 Jul 2023 16:40:17 +0530 Subject: [PATCH 1/3] changes for azure plugin --- lib/tunnel_binary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tunnel_binary.js b/lib/tunnel_binary.js index 0dccbf4..46e97b7 100644 --- a/lib/tunnel_binary.js +++ b/lib/tunnel_binary.js @@ -89,10 +89,10 @@ function TunnelBinary(httpTunnelConfig, options) { try { console.log(`Downloading latest binary`); // make Dir if not there. - if (this.checkPath_(destParentDir)) { - this.rmDir(destParentDir); + if (!this.checkPath_(destParentDir)) { + fs.mkdirSync(destParentDir, { recursive: true }); } - fs.mkdirSync(destParentDir, { recursive: true }); + // Generate binary path. var binaryPath = path.join(destParentDir, this.binaryName); var fileStream = fs.createWriteStream(binaryPath); @@ -140,7 +140,7 @@ function TunnelBinary(httpTunnelConfig, options) { console.log(`Extracting binary`); try { var zip = new AdmZip(binaryPath); - zip.extractAllTo(destParentDir, true); + zip.extractAllTo(destParentDir, false); fs.chmod(destBinaryPath, '0755', function() { return fnCallback(destBinaryPath) }); From c78a102b43050587659570d6f2b87b2ea3836a2c Mon Sep 17 00:00:00 2001 From: Shahnawaz-Sk Date: Wed, 26 Jul 2023 16:45:54 +0530 Subject: [PATCH 2/3] version upgrade --- lib/cfg/node-tunnel-config-v3-latest.json | 5 +++-- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/cfg/node-tunnel-config-v3-latest.json b/lib/cfg/node-tunnel-config-v3-latest.json index 4094ef2..76fc83e 100644 --- a/lib/cfg/node-tunnel-config-v3-latest.json +++ b/lib/cfg/node-tunnel-config-v3-latest.json @@ -76,7 +76,7 @@ }, "AuthUrl": "https://accounts.lambdatest.com/api/user/token/auth", "logEnable": true, - "latest": "4.0.3", + "latest": "4.0.4", "supportedVersions": [ "1.0.0", @@ -116,6 +116,7 @@ "4.0.0", "4.0.1", "4.0.2", - "4.0.3" + "4.0.3", + "4.0.4" ] } diff --git a/package-lock.json b/package-lock.json index 9d31a06..e5a487c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/node-tunnel", - "version": "4.0.3", + "version": "4.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -29,9 +29,9 @@ } }, "@eslint-community/regexpp": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.1.tgz", - "integrity": "sha512-O7x6dMstWLn2ktjcoiNLDkAGG2EjveHL+Vvc+n0fXumkJYAcSqcVYKtwDU+hDZ0uDUsnUagSYaZrOLAYE8un1A==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "dev": true }, "@eslint/eslintrc": { diff --git a/package.json b/package.json index c2d78a0..02ef0e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/node-tunnel", - "version": "4.0.3", + "version": "4.0.4", "description": "Nodejs bindings for LambdaTest Tunnel", "main": "index.js", "files": [ From 5f4258cc20374e9606fda66a22e4301f69d0661a Mon Sep 17 00:00:00 2001 From: Shahnawaz-Sk Date: Sat, 29 Jul 2023 05:52:13 +0530 Subject: [PATCH 3/3] adding env var for infoAPIport --- lib/tunnel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tunnel.js b/lib/tunnel.js index b56e3d0..f05d6b8 100644 --- a/lib/tunnel.js +++ b/lib/tunnel.js @@ -809,6 +809,7 @@ function addArguments_(self, fnCallback) { } } self.infoAPIPort = port; + process.env.INFO_API_PORT = self.infoAPIPort; logger.log( options['user'], options['key'],