UNPKG

tunnelmole

Version:

Tunnelmole, an open source ngrok alternative. Instant public URLs for any http/https based application. Available as a command line application or as an NPM dependency for your code. Stable and maintained. Good test coverage. Works behind firewalls

15 lines 563 B
import { readFile } from 'fs/promises'; const getPackageVersion = async () => { var _a; try { const data = await readFile('./package.json', 'utf8'); const packageJson = JSON.parse(data); return (_a = packageJson.version) !== null && _a !== void 0 ? _a : "Unknown - version seems to be missing from package.json"; } catch (error) { console.info('Error reading package.json:', error); return "Error reading version from package.json"; } }; export { getPackageVersion }; //# sourceMappingURL=version.js.map