devtunnel-cli 3.0.17 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/start.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devtunnel-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DevTunnel - Share local dev servers worldwide. Zero configuration tunnel for any framework. Install via npm: npm install -g devtunnel-cli. Works with Vite, React, Next.js, Express, NestJS, Laravel (PHP), HTML, and more.",
|
|
6
6
|
"main": "src/core/start.js",
|
package/src/core/start.js
CHANGED
|
@@ -12,6 +12,17 @@ const __dirname = dirname(__filename);
|
|
|
12
12
|
// Get project root directory dynamically (two levels up from src/core/)
|
|
13
13
|
const PROJECT_ROOT = dirname(dirname(__dirname));
|
|
14
14
|
|
|
15
|
+
function getPackageVersion() {
|
|
16
|
+
try {
|
|
17
|
+
const pkgPath = join(PROJECT_ROOT, "package.json");
|
|
18
|
+
if (existsSync(pkgPath)) {
|
|
19
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
20
|
+
return pkg.version || "3.0.17";
|
|
21
|
+
}
|
|
22
|
+
} catch (err) {}
|
|
23
|
+
return "3.0.17";
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
// Helper to run command
|
|
16
27
|
function runCommand(command, args = [], cwd = process.cwd()) {
|
|
17
28
|
return new Promise((resolve) => {
|
|
@@ -219,7 +230,7 @@ async function main() {
|
|
|
219
230
|
// Show ASCII logo
|
|
220
231
|
showLogo();
|
|
221
232
|
|
|
222
|
-
console.log(
|
|
233
|
+
console.log(`DevTunnel v${getPackageVersion()}`);
|
|
223
234
|
console.log("Share your local dev servers worldwide");
|
|
224
235
|
console.log("");
|
|
225
236
|
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|