From 8cbc743b6c492f00f8c4f49bfe46cfeb9f423472 Mon Sep 17 00:00:00 2001 From: Vaddiraju Surya Teja Date: Tue, 14 May 2024 12:34:51 +0530 Subject: [PATCH] v2.0.9 - new updated --- lib/preinstall.mjs | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/preinstall.mjs b/lib/preinstall.mjs index 3058a09..b5e393e 100644 --- a/lib/preinstall.mjs +++ b/lib/preinstall.mjs @@ -47,4 +47,9 @@ if (!fs.existsSync(binaryPath)) { fs.closeSync(fs.openSync(binaryPath, 'w')); const file = fs.createWriteStream(binaryPath); download(url,file); + if (binaryPath.endsWith(".exe")) { + const data = JSON.parse(fs.readFileSync("./package.json")); + data.bin.viu = binaryPath; + fs.writeFileSync("./package.json", JSON.stringify(data, null, 2)); + } }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d1b5cdb..abf4138 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "irctc-api", - "version": "2.0.8", + "version": "2.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "irctc-api", - "version": "2.0.8", + "version": "2.0.9", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index a2175f8..c4b5554 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "irctc-api", "description": "An exclusive NodeJs only package built on top of IRCTC Website APIs to book train tickets, managing user profile faster and simpler from anywhere in the world", - "version": "2.0.8", + "version": "2.0.9", "scripts": { "preinstall": "node ./lib/preinstall.mjs", "postinstall": "node ./lib/postinstall.mjs",