pinggy 0.5.8 → 0.6.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/dist/{TunnelManager-ZSVX7U3Z.js → TunnelManager-I3NW6UXU.js} +2 -2
- package/dist/{TunnelTui-S35BNVPO.js → TunnelTui-OZ6AVGTY.js} +2 -2
- package/dist/{chunk-B6IKYBLU.js → chunk-2HGC37SK.js} +7 -4
- package/dist/{chunk-P7XRY5N4.js → chunk-4G6SPMMV.js} +7 -7
- package/dist/{chunk-P7WNBN7F.js → chunk-76SOSXXR.js} +1 -1
- package/dist/{chunk-YWXADADB.js → chunk-H5XJMFNT.js} +1 -1
- package/dist/{chunk-PQSLSIDA.js → chunk-J2U6P376.js} +5 -1
- package/dist/{configStore-2AZRILVC.js → configStore-LLWSTN6X.js} +2 -2
- package/dist/{daemonChild-ZPZK5F4Q.js → daemonChild-CV2UTL6T.js} +5 -5
- package/dist/index.cjs +8 -1
- package/dist/index.js +5 -5
- package/dist/{main-VBWX7HTB.js → main-WQ7NUQL4.js} +5 -5
- package/dist/workers/file_serve_worker.js +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TunnelAlreadyRunningError,
|
|
3
3
|
TunnelManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J2U6P376.js";
|
|
5
5
|
import "./chunk-UB26QJ4T.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-76SOSXXR.js";
|
|
7
7
|
import "./chunk-GBYF2H4H.js";
|
|
8
8
|
export {
|
|
9
9
|
TunnelAlreadyRunningError,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TunnelManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J2U6P376.js";
|
|
4
4
|
import "./chunk-UB26QJ4T.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-76SOSXXR.js";
|
|
8
8
|
import "./chunk-GBYF2H4H.js";
|
|
9
9
|
|
|
10
10
|
// src/tui/blessed/TunnelTui.ts
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
getVersion,
|
|
14
14
|
isValidPort,
|
|
15
15
|
printer_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J2U6P376.js";
|
|
17
17
|
import {
|
|
18
18
|
logger
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-76SOSXXR.js";
|
|
20
20
|
import {
|
|
21
21
|
getDaemonInfoPath,
|
|
22
22
|
getDaemonLogPath
|
|
@@ -305,7 +305,10 @@ function pinggyOptionsToTunnelConfigV1(opts, configStoredInCli) {
|
|
|
305
305
|
originalRequestUrl: opts.originalRequestUrl ?? false,
|
|
306
306
|
allowPreflight: opts.allowPreflight ?? false,
|
|
307
307
|
haProxy: opts.haProxy,
|
|
308
|
-
optional:
|
|
308
|
+
optional: {
|
|
309
|
+
...configStoredInCli.optional || {},
|
|
310
|
+
...opts.optional || {}
|
|
311
|
+
}
|
|
309
312
|
};
|
|
310
313
|
}
|
|
311
314
|
function tunnelConfigToPinggyOptions(config) {
|
|
@@ -1679,7 +1682,7 @@ async function ensureDaemonRunning() {
|
|
|
1679
1682
|
return existing;
|
|
1680
1683
|
}
|
|
1681
1684
|
if (process.versions.electron) {
|
|
1682
|
-
const { runDaemonChild } = await import("./daemonChild-
|
|
1685
|
+
const { runDaemonChild } = await import("./daemonChild-CV2UTL6T.js");
|
|
1683
1686
|
const handle = await runDaemonChild({
|
|
1684
1687
|
installSignalHandlers: false,
|
|
1685
1688
|
exitOnFailure: false,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
startDaemon,
|
|
14
14
|
startRemoteManagement,
|
|
15
15
|
stopDaemon
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2HGC37SK.js";
|
|
17
17
|
import {
|
|
18
18
|
readDaemonConfig
|
|
19
19
|
} from "./chunk-MT44NAXX.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
updateConfigAutoStart,
|
|
41
41
|
updateTunnelConfig,
|
|
42
42
|
validateName
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-H5XJMFNT.js";
|
|
44
44
|
import {
|
|
45
45
|
TunnelManager,
|
|
46
46
|
detachAllTunnelLoggers,
|
|
@@ -52,14 +52,14 @@ import {
|
|
|
52
52
|
isValidPort,
|
|
53
53
|
printer_default,
|
|
54
54
|
setTunnelLoggingEnabled
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-J2U6P376.js";
|
|
56
56
|
import {
|
|
57
57
|
configureLogger,
|
|
58
58
|
enablePackageLogging,
|
|
59
59
|
getLogLevel,
|
|
60
60
|
logger,
|
|
61
61
|
setLogLevel
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-76SOSXXR.js";
|
|
63
63
|
import {
|
|
64
64
|
ensurePinggyConfigDir,
|
|
65
65
|
ensurePinggyLogDir,
|
|
@@ -1126,7 +1126,7 @@ async function connectTui(opts) {
|
|
|
1126
1126
|
const exitMessage = opts.exitMessage || "Stopping tunnel...";
|
|
1127
1127
|
if (!noTui && process.stdin.isTTY) {
|
|
1128
1128
|
try {
|
|
1129
|
-
const { TunnelTui } = await import("./TunnelTui-
|
|
1129
|
+
const { TunnelTui } = await import("./TunnelTui-OZ6AVGTY.js");
|
|
1130
1130
|
const tui = new TunnelTui({
|
|
1131
1131
|
urls,
|
|
1132
1132
|
greet,
|
|
@@ -1349,7 +1349,7 @@ async function startBackgroundTunnels(configs, values, positionals) {
|
|
|
1349
1349
|
client.close();
|
|
1350
1350
|
}
|
|
1351
1351
|
async function startAutoStartTunnels() {
|
|
1352
|
-
const { getAutoStartConfigs: getAutoStartConfigs2 } = await import("./configStore-
|
|
1352
|
+
const { getAutoStartConfigs: getAutoStartConfigs2 } = await import("./configStore-LLWSTN6X.js");
|
|
1353
1353
|
const configs = getAutoStartConfigs2();
|
|
1354
1354
|
if (configs.length === 0) {
|
|
1355
1355
|
printer_default.warn("No configs marked for auto-start. Use: pinggy config auto <name>");
|
|
@@ -3463,7 +3463,7 @@ async function main() {
|
|
|
3463
3463
|
const { values, positionals, hasAnyArgs } = parseCliArgs(cliOptions);
|
|
3464
3464
|
configureLogger(values);
|
|
3465
3465
|
if (values["_daemon-child"]) {
|
|
3466
|
-
const { runDaemonChild: runDaemonChild2 } = await import("./daemonChild-
|
|
3466
|
+
const { runDaemonChild: runDaemonChild2 } = await import("./daemonChild-CV2UTL6T.js");
|
|
3467
3467
|
await runDaemonChild2();
|
|
3468
3468
|
return;
|
|
3469
3469
|
}
|
|
@@ -16,7 +16,7 @@ function setLogLevel(level) {
|
|
|
16
16
|
}
|
|
17
17
|
import("./daemonConfig-G6S46GPJ.js").then(({ writeDaemonConfig }) => writeDaemonConfig({ logLevel: level })).catch(() => {
|
|
18
18
|
});
|
|
19
|
-
import("./TunnelManager-
|
|
19
|
+
import("./TunnelManager-I3NW6UXU.js").then(({ TunnelManager }) => TunnelManager.getInstance().applyLogLevelToActiveTunnels(level)).catch(() => {
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var _logger = null;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getLogLevel,
|
|
6
6
|
logger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-76SOSXXR.js";
|
|
8
8
|
import {
|
|
9
9
|
getTunnelLogPath
|
|
10
10
|
} from "./chunk-GBYF2H4H.js";
|
|
@@ -421,6 +421,10 @@ var TunnelManager = class _TunnelManager {
|
|
|
421
421
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
422
422
|
isFatal: true
|
|
423
423
|
};
|
|
424
|
+
managed.isStopping = true;
|
|
425
|
+
managed.instance.stop().catch((e) => {
|
|
426
|
+
logger.debug("Stop after failed start", { tunnelId, error: errorMessage(e) });
|
|
427
|
+
});
|
|
424
428
|
throw error;
|
|
425
429
|
}
|
|
426
430
|
logger.info("Tunnel started", { tunnelId, urls });
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
validateName,
|
|
23
23
|
validateNameForStorage,
|
|
24
24
|
validateNameStrict
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-H5XJMFNT.js";
|
|
26
|
+
import "./chunk-76SOSXXR.js";
|
|
27
27
|
import "./chunk-GBYF2H4H.js";
|
|
28
28
|
export {
|
|
29
29
|
CONFIG_VERBS,
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
trackIPCTunnelStart,
|
|
7
7
|
trackTunnelStart,
|
|
8
8
|
trackTunnelStop
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-4G6SPMMV.js";
|
|
10
|
+
import "./chunk-2HGC37SK.js";
|
|
11
11
|
import "./chunk-MT44NAXX.js";
|
|
12
12
|
import {
|
|
13
13
|
DaemonHost
|
|
14
14
|
} from "./chunk-I4HXBP5G.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-H5XJMFNT.js";
|
|
16
|
+
import "./chunk-J2U6P376.js";
|
|
17
17
|
import "./chunk-UB26QJ4T.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-76SOSXXR.js";
|
|
19
19
|
import "./chunk-GBYF2H4H.js";
|
|
20
20
|
export {
|
|
21
21
|
DaemonHost,
|
package/dist/index.cjs
CHANGED
|
@@ -760,6 +760,10 @@ var init_TunnelManager = __esm({
|
|
|
760
760
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
761
761
|
isFatal: true
|
|
762
762
|
};
|
|
763
|
+
managed.isStopping = true;
|
|
764
|
+
managed.instance.stop().catch((e) => {
|
|
765
|
+
logger.debug("Stop after failed start", { tunnelId, error: errorMessage(e) });
|
|
766
|
+
});
|
|
763
767
|
throw error;
|
|
764
768
|
}
|
|
765
769
|
logger.info("Tunnel started", { tunnelId, urls });
|
|
@@ -2209,7 +2213,10 @@ function pinggyOptionsToTunnelConfigV1(opts, configStoredInCli) {
|
|
|
2209
2213
|
originalRequestUrl: opts.originalRequestUrl ?? false,
|
|
2210
2214
|
allowPreflight: opts.allowPreflight ?? false,
|
|
2211
2215
|
haProxy: opts.haProxy,
|
|
2212
|
-
optional:
|
|
2216
|
+
optional: {
|
|
2217
|
+
...configStoredInCli.optional || {},
|
|
2218
|
+
...opts.optional || {}
|
|
2219
|
+
}
|
|
2213
2220
|
};
|
|
2214
2221
|
}
|
|
2215
2222
|
function tunnelConfigToPinggyOptions(config) {
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
initiateRemoteManagement,
|
|
15
15
|
isDaemonRunning,
|
|
16
16
|
startRemoteManagement
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2HGC37SK.js";
|
|
18
18
|
import "./chunk-I4HXBP5G.js";
|
|
19
19
|
import {
|
|
20
20
|
bulkReplace,
|
|
@@ -33,15 +33,15 @@ import {
|
|
|
33
33
|
validateName,
|
|
34
34
|
validateNameForStorage,
|
|
35
35
|
validateNameStrict
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-H5XJMFNT.js";
|
|
37
37
|
import {
|
|
38
38
|
TunnelManager,
|
|
39
39
|
printer_default
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-J2U6P376.js";
|
|
41
41
|
import "./chunk-UB26QJ4T.js";
|
|
42
42
|
import {
|
|
43
43
|
enablePackageLogging
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-76SOSXXR.js";
|
|
45
45
|
import {
|
|
46
46
|
ensureTunnelConfigDir,
|
|
47
47
|
getDaemonInfoPath,
|
|
@@ -139,7 +139,7 @@ async function verifyAndLoad() {
|
|
|
139
139
|
process.exit(1);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
await import("./main-
|
|
142
|
+
await import("./main-WQ7NUQL4.js");
|
|
143
143
|
}
|
|
144
144
|
verifyAndLoad().catch((err) => {
|
|
145
145
|
printer_default.fatal(`Failed to start CLI:, ${err}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runDaemonChild
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4G6SPMMV.js";
|
|
5
5
|
import {
|
|
6
6
|
RemoteManagementUnauthorizedError,
|
|
7
7
|
TunnelOperations,
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
getRemoteManagementState,
|
|
14
14
|
initiateRemoteManagement,
|
|
15
15
|
isDaemonRunning
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2HGC37SK.js";
|
|
17
17
|
import "./chunk-MT44NAXX.js";
|
|
18
18
|
import {
|
|
19
19
|
DaemonHost
|
|
20
20
|
} from "./chunk-I4HXBP5G.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-H5XJMFNT.js";
|
|
22
22
|
import {
|
|
23
23
|
TunnelManager
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-J2U6P376.js";
|
|
25
25
|
import "./chunk-UB26QJ4T.js";
|
|
26
26
|
import {
|
|
27
27
|
enablePackageLogging
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-76SOSXXR.js";
|
|
29
29
|
import "./chunk-GBYF2H4H.js";
|
|
30
30
|
export {
|
|
31
31
|
DaemonHost,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinggy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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. ",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@pinggy/pinggy": "^0.5.
|
|
55
|
+
"@pinggy/pinggy": "^0.5.3",
|
|
56
56
|
"blessed": "^0.1.81",
|
|
57
57
|
"clipboardy": "^5.0.0",
|
|
58
58
|
"mime": "^4.1.0",
|