@hienlh/ppm 0.7.1 → 0.7.2
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/CHANGELOG.md +5 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/server/index.ts +14 -0
- package/src/services/tunnel.service.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.2] - 2026-03-20
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **Tunnel URL sync**: `ppm start --share` tunnel URL now synced into `tunnelService` on daemon startup — Share button in web UI shows correct URL instead of treating tunnel as inactive and starting a duplicate
|
|
7
|
+
|
|
3
8
|
## [0.7.1] - 2026-03-20
|
|
4
9
|
|
|
5
10
|
### Fixed
|
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ A mobile-first web IDE with AI chat, terminal, git, database tools, and file exp
|
|
|
9
9
|
```bash
|
|
10
10
|
# 1. Install Bun (if you don't have it)
|
|
11
11
|
curl -fsSL https://bun.sh/install | bash
|
|
12
|
+
# or via npm
|
|
13
|
+
npm install -g bun
|
|
12
14
|
|
|
13
15
|
# 2. Run directly (no install needed)
|
|
14
16
|
bunx @hienlh/ppm start
|
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -448,6 +448,20 @@ if (process.argv.includes("__serve__")) {
|
|
|
448
448
|
configService.load(configPath);
|
|
449
449
|
await setupLogFile();
|
|
450
450
|
|
|
451
|
+
// Sync externally-started tunnel URL (from `ppm start --share`) into tunnelService
|
|
452
|
+
// so GET /api/tunnel reflects the correct state and Share button doesn't start a duplicate.
|
|
453
|
+
try {
|
|
454
|
+
const { resolve: r } = await import("node:path");
|
|
455
|
+
const { homedir: h } = await import("node:os");
|
|
456
|
+
const { readFileSync: rf } = await import("node:fs");
|
|
457
|
+
const statusFile = r(h(), ".ppm", "status.json");
|
|
458
|
+
const status = JSON.parse(rf(statusFile, "utf-8"));
|
|
459
|
+
if (status.shareUrl) {
|
|
460
|
+
const { tunnelService } = await import("../services/tunnel.service.ts");
|
|
461
|
+
tunnelService.setExternalUrl(status.shareUrl);
|
|
462
|
+
}
|
|
463
|
+
} catch { /* status.json missing or no shareUrl — normal */ }
|
|
464
|
+
|
|
451
465
|
Bun.serve({
|
|
452
466
|
port,
|
|
453
467
|
hostname: host,
|
|
@@ -98,6 +98,11 @@ class TunnelService {
|
|
|
98
98
|
getTunnelUrl(): string | null {
|
|
99
99
|
return this.url;
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
/** Inject an externally-started tunnel URL (e.g. from daemon --share) */
|
|
103
|
+
setExternalUrl(url: string): void {
|
|
104
|
+
this.url = url;
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
/** Singleton tunnel service */
|