devtunnel-cli 3.0.24 → 3.0.25
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 +18 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devtunnel-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.25",
|
|
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
|
@@ -17,10 +17,10 @@ function getPackageVersion() {
|
|
|
17
17
|
const pkgPath = join(PROJECT_ROOT, "package.json");
|
|
18
18
|
if (existsSync(pkgPath)) {
|
|
19
19
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
20
|
-
return pkg.version || "3.0.
|
|
20
|
+
return pkg.version || "3.0.25";
|
|
21
21
|
}
|
|
22
22
|
} catch (err) {}
|
|
23
|
-
return "3.0.
|
|
23
|
+
return "3.0.25";
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// Helper to run command
|
|
@@ -418,12 +418,15 @@ async function main() {
|
|
|
418
418
|
projectPath = selectedPath;
|
|
419
419
|
projectName = basename(selectedPath);
|
|
420
420
|
|
|
421
|
-
// Try to detect port for selected project (Laravel → 8000, Node from package.json
|
|
421
|
+
// Try to detect port for selected project (Laravel → 8000, HTML → 5500, Node from package.json)
|
|
422
422
|
const selectedPackagePath = join(selectedPath, "package.json");
|
|
423
423
|
const laravelSelected = detectLaravelProject(selectedPath);
|
|
424
|
+
const htmlSelected = detectHtmlProject(selectedPath);
|
|
424
425
|
const detectedPort = laravelSelected
|
|
425
426
|
? laravelSelected.defaultPort
|
|
426
|
-
:
|
|
427
|
+
: htmlSelected
|
|
428
|
+
? htmlSelected.defaultPort
|
|
429
|
+
: detectPortFromPackage(selectedPackagePath);
|
|
427
430
|
|
|
428
431
|
const portResponse = await prompts({
|
|
429
432
|
type: "number",
|
|
@@ -438,6 +441,17 @@ async function main() {
|
|
|
438
441
|
}
|
|
439
442
|
|
|
440
443
|
devPort = portResponse.port;
|
|
444
|
+
} else {
|
|
445
|
+
// User confirmed – let them keep default port or type another (e.g. HTML default 5500, can change)
|
|
446
|
+
const portPrompt = await prompts({
|
|
447
|
+
type: "number",
|
|
448
|
+
name: "port",
|
|
449
|
+
message: "Dev server port (press Enter for default):",
|
|
450
|
+
initial: devPort
|
|
451
|
+
});
|
|
452
|
+
if (portPrompt.port != null && portPrompt.port > 0) {
|
|
453
|
+
devPort = portPrompt.port;
|
|
454
|
+
}
|
|
441
455
|
}
|
|
442
456
|
} else if (autoDetected && !autoDetected.port) {
|
|
443
457
|
// Project detected but no port
|