pinggy 0.6.10 → 0.6.11
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 +9 -4
- package/CLAUDE.md +5 -3
- package/README.md +12 -0
- package/dist/{chunk-AYU3GM4D.js → chunk-RYO5T2JT.js} +35 -19
- package/dist/{chunk-G3NF35JY.js → chunk-W47AYOH2.js} +2819 -278
- package/dist/{daemonChild-4ZZ3YQDL.js → daemonChild-GGG34AOT.js} +2 -2
- package/dist/index.cjs +3070 -378
- package/dist/index.js +3 -3
- package/dist/{main-3D7R75PR.js → main-FCIOVX5I.js} +2 -2
- package/dist/{updateChild-ZOC3VGJL.js → updateChild-RNCLN24C.js} +1 -1
- package/package.json +1 -1
- package/scripts/install/install.ps1 +3 -2
- package/scripts/install/install.sh +13 -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-W47AYOH2.js";
|
|
17
17
|
import "./chunk-VD5ZFCZW.js";
|
|
18
18
|
import "./chunk-P54K7NPF.js";
|
|
19
19
|
import {
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
isDaemonRunning,
|
|
45
45
|
removeDeadDaemonFiles,
|
|
46
46
|
setDaemonLauncher
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-RYO5T2JT.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-FCIOVX5I.js");
|
|
159
159
|
}
|
|
160
160
|
verifyAndLoad().catch((err) => {
|
|
161
161
|
printer_default.fatal(`Failed to start CLI:, ${err}`);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getRemoteManagementState,
|
|
7
7
|
initiateRemoteManagement,
|
|
8
8
|
runDaemonChild
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W47AYOH2.js";
|
|
10
10
|
import "./chunk-VD5ZFCZW.js";
|
|
11
11
|
import "./chunk-P54K7NPF.js";
|
|
12
12
|
import "./chunk-3IPMFCEF.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getDaemonInfo,
|
|
22
22
|
getInProcessDaemonHandle,
|
|
23
23
|
isDaemonRunning
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RYO5T2JT.js";
|
|
25
25
|
import {
|
|
26
26
|
DaemonHost
|
|
27
27
|
} from "./chunk-MKGD2QAI.js";
|
package/package.json
CHANGED
|
@@ -519,8 +519,9 @@ function Install-Pinggy {
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
# Runs $pinggyPath by its full path, with -b, as Invoke-DeviceLogin does. connect reads DEVICE_AGENT_TOKEN
|
|
522
|
-
# from the environment it inherits
|
|
523
|
-
#
|
|
522
|
+
# from the environment it inherits. It reads the console for 1 question, whether the dashboard may reach this
|
|
523
|
+
# machine's files. With no console it asks nothing and leaves file access on. The token leaves the environment
|
|
524
|
+
# before the service question, so no later command inherits it.
|
|
524
525
|
function Invoke-DeviceConnect {
|
|
525
526
|
$connectArguments = @('device', 'connect', '-b')
|
|
526
527
|
if ($env:PINGGY_MANAGE) { $connectArguments += @('--manage', $env:PINGGY_MANAGE) }
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
# Setting, from the dashboard's command:
|
|
21
21
|
# DEVICE_AGENT_TOKEN a device token. `pinggy device connect` runs with no email and no code. Every update question
|
|
22
22
|
# is still asked, and a pinggy older than 0.6.2 ignores the token. The token reaches the CLI in
|
|
23
|
-
# its environment, never on a command line. Set it on sh, not on curl, so curl never holds it
|
|
23
|
+
# its environment, never on a command line. Set it on sh, not on curl, so curl never holds it.
|
|
24
|
+
# In a terminal, connect asks whether the dashboard may reach this machine's files
|
|
24
25
|
#
|
|
25
26
|
# Overrides, for dev and tests:
|
|
26
27
|
# PINGGY_VERSION a release tag, such as v0.6.1. Default: the version pinggy.io publishes, or for an npm copy the
|
|
@@ -836,18 +837,23 @@ offer_daemon_restart() {
|
|
|
836
837
|
}
|
|
837
838
|
|
|
838
839
|
# Runs $pinggy_path, the copy this script installed, updated or kept, by its full path, so another pinggy earlier on
|
|
839
|
-
# PATH does not answer. connect reads DEVICE_AGENT_TOKEN from the environment this script passes on
|
|
840
|
-
#
|
|
841
|
-
#
|
|
842
|
-
#
|
|
840
|
+
# PATH does not answer. connect reads DEVICE_AGENT_TOKEN from the environment this script passes on. It asks 1
|
|
841
|
+
# question, whether the dashboard may reach this machine's files, so it reads /dev/tty when there is one. With none it
|
|
842
|
+
# reads /dev/null, asks nothing, and leaves file access on. Never this script's stdin, which under `curl | sh` holds
|
|
843
|
+
# the rest of the script. -b is the default now. It is passed anyway, so an older pinggy the user kept runs the agent
|
|
844
|
+
# in its daemon too. The token leaves the environment before the service question, so no later command inherits it.
|
|
843
845
|
connect_with_device_token() {
|
|
844
846
|
export DEVICE_AGENT_TOKEN
|
|
845
847
|
say ""
|
|
848
|
+
connect_input=/dev/null
|
|
849
|
+
if has_terminal; then
|
|
850
|
+
connect_input=/dev/tty
|
|
851
|
+
fi
|
|
846
852
|
status=0
|
|
847
853
|
if [ -n "${PINGGY_MANAGE:-}" ]; then
|
|
848
|
-
"$pinggy_path" device connect -b --manage "$PINGGY_MANAGE"
|
|
854
|
+
"$pinggy_path" device connect -b --manage "$PINGGY_MANAGE" <"$connect_input" || status=$?
|
|
849
855
|
else
|
|
850
|
-
"$pinggy_path" device connect -b
|
|
856
|
+
"$pinggy_path" device connect -b <"$connect_input" || status=$?
|
|
851
857
|
fi
|
|
852
858
|
unset DEVICE_AGENT_TOKEN
|
|
853
859
|
if [ "$status" -ne 0 ]; then
|