pinggy 0.6.4 → 0.6.6

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.
Files changed (32) hide show
  1. package/ARCHITECTURE.md +126 -57
  2. package/CLAUDE.md +25 -12
  3. package/README.md +5 -5
  4. package/dist/{TunnelManager-NGSUBZYI.js → TunnelManager-JRVEADS4.js} +4 -3
  5. package/dist/{TunnelTui-UCG2YSLX.js → TunnelTui-6H4NPUNF.js} +4 -3
  6. package/dist/{chunk-Y435RMHQ.js → chunk-2GIJXE4K.js} +3 -2
  7. package/dist/{chunk-QNUVQ6KD.js → chunk-3WMTTJHI.js} +11 -299
  8. package/dist/chunk-4XXAHYCJ.js +927 -0
  9. package/dist/{chunk-PD7HXVQ3.js → chunk-CZOKR73F.js} +18 -1
  10. package/dist/chunk-FQ22KFVV.js +882 -0
  11. package/dist/{chunk-UVJYL2ZN.js → chunk-HAFTH5MX.js} +933 -576
  12. package/dist/chunk-HTIWY3O5.js +293 -0
  13. package/dist/{chunk-MV56U3E6.js → chunk-LWCVB42S.js} +2 -2
  14. package/dist/{chunk-AFMTIELL.js → chunk-MAK5R4WQ.js} +20 -0
  15. package/dist/{chunk-7EQKHVQX.js → chunk-MHQ3CVEB.js} +4 -51
  16. package/dist/chunk-MKGD2QAI.js +51 -0
  17. package/dist/{chunk-CIOYQU7F.js → chunk-Q5NCTGNS.js} +49 -233
  18. package/dist/{configStore-RR5ZU4E3.js → configStore-JJUWT2YO.js} +3 -3
  19. package/dist/{daemonChild-WHS676G4.js → daemonChild-Q6WGYKYX.js} +14 -14
  20. package/dist/daemonConfig-VWK4TXVS.js +17 -0
  21. package/dist/index.cjs +3214 -935
  22. package/dist/index.d.cts +150 -129
  23. package/dist/index.d.ts +150 -129
  24. package/dist/index.js +18 -13
  25. package/dist/{ipcClient-XGF2KCQO.js → ipcClient-IZ5R6TPN.js} +2 -1
  26. package/dist/{main-JRVKAIHH.js → main-BI7ACRHS.js} +19 -14
  27. package/dist/updateChild-Z3SIRYO5.js +237 -0
  28. package/dist/workers/file_serve_worker.js +1 -1
  29. package/package.json +2 -1
  30. package/scripts/install/install.ps1 +49 -5
  31. package/scripts/install/install.sh +99 -12
  32. package/dist/daemonConfig-QVXQ47XH.js +0 -9
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensurePinggyConfigDir,
3
3
  getDaemonConfigPath
4
- } from "./chunk-AFMTIELL.js";
4
+ } from "./chunk-MAK5R4WQ.js";
5
5
 
6
6
  // src/daemon/lifecycle/daemonConfig.ts
7
7
  import fs from "fs";
@@ -17,6 +17,19 @@ function readDaemonConfig() {
17
17
  return null;
18
18
  }
19
19
  }
20
+ function configuredLogLevel() {
21
+ return readDaemonConfig()?.logLevel ?? process.env.PINGGY_LOG_LEVEL ?? "info";
22
+ }
23
+ function savedDeviceAgent() {
24
+ return readDaemonConfig()?.deviceAgent ?? null;
25
+ }
26
+ function saveDeviceAgent(startedBy) {
27
+ writeDaemonConfig({ deviceAgent: { startedAt: (/* @__PURE__ */ new Date()).toISOString(), startedBy } });
28
+ }
29
+ function forgetDeviceAgent() {
30
+ if (!savedDeviceAgent()) return;
31
+ writeDaemonConfig({ deviceAgent: void 0 });
32
+ }
20
33
  function writeDaemonConfig(partial) {
21
34
  try {
22
35
  ensurePinggyConfigDir();
@@ -32,5 +45,9 @@ function writeDaemonConfig(partial) {
32
45
 
33
46
  export {
34
47
  readDaemonConfig,
48
+ configuredLogLevel,
49
+ savedDeviceAgent,
50
+ saveDeviceAgent,
51
+ forgetDeviceAgent,
35
52
  writeDaemonConfig
36
53
  };