pinggy 0.6.11 → 0.7.0
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/ARCHITECTURE.md +28 -18
- package/CLAUDE.md +5 -4
- package/README.md +20 -4
- package/dist/{chunk-RYO5T2JT.js → chunk-2IPBK3RG.js} +139 -115
- package/dist/{chunk-3IPMFCEF.js → chunk-QUVQ7ODD.js} +1 -0
- package/dist/{chunk-W47AYOH2.js → chunk-ZSED6OIR.js} +276 -33
- package/dist/{configStore-6LCHFPQX.js → configStore-VDPOPFLJ.js} +1 -1
- package/dist/{daemonChild-GGG34AOT.js → daemonChild-5HZFQLQR.js} +3 -3
- package/dist/index.cjs +416 -150
- package/dist/index.js +4 -4
- package/dist/{main-FCIOVX5I.js → main-M4BTDE2A.js} +3 -3
- package/dist/{updateChild-RNCLN24C.js → updateChild-CEVYCBED.js} +1 -1
- package/package.json +2 -1
- package/scripts/install/install.ps1 +9 -8
- package/scripts/install/install.sh +8 -7
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
restorableTunnelCount,
|
|
14
14
|
runDaemonChild,
|
|
15
15
|
startRemoteManagement
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZSED6OIR.js";
|
|
17
17
|
import "./chunk-VD5ZFCZW.js";
|
|
18
18
|
import "./chunk-P54K7NPF.js";
|
|
19
19
|
import {
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
validateName,
|
|
34
34
|
validateNameForStorage,
|
|
35
35
|
validateNameStrict
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QUVQ7ODD.js";
|
|
37
37
|
import "./chunk-XZ64ZAGO.js";
|
|
38
38
|
import {
|
|
39
39
|
TunnelManager
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
isDaemonRunning,
|
|
45
45
|
removeDeadDaemonFiles,
|
|
46
46
|
setDaemonLauncher
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2IPBK3RG.js";
|
|
48
48
|
import {
|
|
49
49
|
DaemonHost,
|
|
50
50
|
DeviceAgentState
|
|
@@ -155,7 +155,7 @@ async function verifyAndLoad() {
|
|
|
155
155
|
process.exit(1);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
await import("./main-
|
|
158
|
+
await import("./main-M4BTDE2A.js");
|
|
159
159
|
}
|
|
160
160
|
verifyAndLoad().catch((err) => {
|
|
161
161
|
printer_default.fatal(`Failed to start CLI:, ${err}`);
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
getRemoteManagementState,
|
|
7
7
|
initiateRemoteManagement,
|
|
8
8
|
runDaemonChild
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZSED6OIR.js";
|
|
10
10
|
import "./chunk-VD5ZFCZW.js";
|
|
11
11
|
import "./chunk-P54K7NPF.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-QUVQ7ODD.js";
|
|
13
13
|
import "./chunk-XZ64ZAGO.js";
|
|
14
14
|
import {
|
|
15
15
|
TunnelManager
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getDaemonInfo,
|
|
22
22
|
getInProcessDaemonHandle,
|
|
23
23
|
isDaemonRunning
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2IPBK3RG.js";
|
|
25
25
|
import {
|
|
26
26
|
DaemonHost
|
|
27
27
|
} from "./chunk-MKGD2QAI.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinggy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Create secure, shareable tunnels to your localhost and manage them from the command line. ",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@xterm/headless": "^6.0.0",
|
|
72
72
|
"blessed": "^0.1.81",
|
|
73
73
|
"clipboardy": "^5.0.0",
|
|
74
|
+
"major": "^1.0.26",
|
|
74
75
|
"mime": "^4.1.0",
|
|
75
76
|
"node-pty": "^1.1.0",
|
|
76
77
|
"picocolors": "^1.1.1",
|
|
@@ -53,7 +53,7 @@ function Install-Pinggy {
|
|
|
53
53
|
$npmPackage = 'pinggy'
|
|
54
54
|
# The file a running daemon writes. Its path lives in src/utils/configDir.ts.
|
|
55
55
|
$daemonInfoPath = Join-Path $env:APPDATA 'pinggy\daemon.json'
|
|
56
|
-
# The task `pinggy
|
|
56
|
+
# The task `pinggy autostart on` registers. Its name lives in src/daemon/lifecycle/serviceInstaller.ts.
|
|
57
57
|
$loginTaskName = 'PinggyDaemon'
|
|
58
58
|
$cpuArchitectureX64 = 9
|
|
59
59
|
$cpuArchitectureArm64 = 12
|
|
@@ -390,8 +390,8 @@ function Install-Pinggy {
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
# The task counts only when it runs the binary this script installs. A task left by a pinggy elsewhere gets the
|
|
393
|
-
# question, and
|
|
394
|
-
# language of Windows.
|
|
393
|
+
# question, and `pinggy autostart on` replaces it. Get-ScheduledTask, because schtasks prints field names
|
|
394
|
+
# in the language of Windows.
|
|
395
395
|
function Test-LoginTask {
|
|
396
396
|
try {
|
|
397
397
|
$task = Get-ScheduledTask -TaskName $loginTaskName -ErrorAction Stop
|
|
@@ -402,22 +402,23 @@ function Install-Pinggy {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
# Asks once the device connects, so the agent starts again after a restart. Leaves a registered task as it is.
|
|
405
|
-
# `pinggy
|
|
405
|
+
# `pinggy autostart on` writes the task only from this script's binary, so another copy skips the
|
|
406
|
+
# question. After `device login -b` the agent is saved, so `on` asks nothing more.
|
|
406
407
|
function Invoke-LoginServiceOffer {
|
|
407
408
|
if ($skipLoginService) { return }
|
|
408
409
|
if (Test-LoginTask) { return }
|
|
409
410
|
if (-not (Test-Interactive)) {
|
|
410
|
-
Write-Host 'To start pinggy when this computer starts, run: pinggy
|
|
411
|
+
Write-Host 'To start pinggy when this computer starts, run: pinggy autostart on'
|
|
411
412
|
return
|
|
412
413
|
}
|
|
413
414
|
Write-Host ''
|
|
414
415
|
if (-not (Confirm-Question 'Start pinggy automatically when this computer starts? [Y/n]')) {
|
|
415
|
-
Write-Host 'To start pinggy when this computer starts, run: pinggy
|
|
416
|
+
Write-Host 'To start pinggy when this computer starts, run: pinggy autostart on'
|
|
416
417
|
return
|
|
417
418
|
}
|
|
418
|
-
& $installPath
|
|
419
|
+
& $installPath autostart on
|
|
419
420
|
if ($LASTEXITCODE -ne 0) {
|
|
420
|
-
Write-Host 'Could not
|
|
421
|
+
Write-Host 'Could not turn on autostart. To try again, run: pinggy autostart on'
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
424
|
|
|
@@ -651,9 +651,9 @@ add_link_dir_to_rc_file() {
|
|
|
651
651
|
say "In this terminal, run: source $(shown "$rc_file")"
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
# The
|
|
654
|
+
# The boot entry `pinggy autostart on` writes. Its paths live in src/daemon/lifecycle/serviceInstaller.ts.
|
|
655
655
|
# The service counts only when it runs the binary this script installs. A service left by a pinggy elsewhere gets the
|
|
656
|
-
# question, and
|
|
656
|
+
# question, and `pinggy autostart on` replaces it.
|
|
657
657
|
login_service_installed() {
|
|
658
658
|
case "$os" in
|
|
659
659
|
macos) service_file="$HOME/Library/LaunchAgents/$LAUNCHD_LABEL.plist" ;;
|
|
@@ -671,7 +671,8 @@ login_service_supported() {
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
# Asks once the device connects, so the agent starts again after a restart. Leaves an installed service as it is.
|
|
674
|
-
# `pinggy
|
|
674
|
+
# `pinggy autostart on` writes the boot entry only from this script's binary, so another copy skips the
|
|
675
|
+
# question. After `device login -b` the agent is saved, so `on` asks nothing more with no terminal.
|
|
675
676
|
offer_login_service() {
|
|
676
677
|
if [ "${skip_login_service:-0}" = 1 ]; then
|
|
677
678
|
return 0
|
|
@@ -680,17 +681,17 @@ offer_login_service() {
|
|
|
680
681
|
return 0
|
|
681
682
|
fi
|
|
682
683
|
if ! has_terminal; then
|
|
683
|
-
say "To start pinggy when this computer starts, run: pinggy
|
|
684
|
+
say "To start pinggy when this computer starts, run: pinggy autostart on"
|
|
684
685
|
return 0
|
|
685
686
|
fi
|
|
686
687
|
|
|
687
688
|
say ""
|
|
688
689
|
if ! confirm "Start pinggy automatically when this computer starts? [Y/n] "; then
|
|
689
|
-
say "To start pinggy when this computer starts, run: pinggy
|
|
690
|
+
say "To start pinggy when this computer starts, run: pinggy autostart on"
|
|
690
691
|
return 0
|
|
691
692
|
fi
|
|
692
|
-
if ! "$INSTALL_PATH"
|
|
693
|
-
say "Could not
|
|
693
|
+
if ! "$INSTALL_PATH" autostart on </dev/null; then
|
|
694
|
+
say "Could not turn on autostart. To try again, run: pinggy autostart on"
|
|
694
695
|
fi
|
|
695
696
|
}
|
|
696
697
|
|