pgserve 2.3.0 → 2.5.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.
Files changed (44) hide show
  1. package/bin/pgserve-wrapper.cjs +9 -4
  2. package/bin/postgres-server.js +170 -631
  3. package/config/logrotate.d/pgserve +47 -0
  4. package/config/pgaudit.conf +31 -0
  5. package/package.json +3 -2
  6. package/scripts/audit-redaction-lint.js +349 -0
  7. package/scripts/test-npx.sh +32 -10
  8. package/src/audit/audit.js +134 -0
  9. package/src/cli-install.cjs +340 -100
  10. package/src/commands/uninstall.js +241 -0
  11. package/src/commands/verify.js +360 -0
  12. package/src/cosign/cache-token.js +328 -0
  13. package/src/cosign/schema.js +97 -0
  14. package/src/cosign/trust-list.js +81 -0
  15. package/src/cosign/verify-binary.js +277 -0
  16. package/src/index.js +11 -44
  17. package/src/lib/admin-json.js +202 -0
  18. package/src/lib/pm2-args.js +119 -0
  19. package/src/lib/runtime-json.js +181 -0
  20. package/src/lib/socket-dir.js +69 -0
  21. package/src/postgres.js +64 -5
  22. package/src/upgrade/index.js +5 -0
  23. package/src/upgrade/steps/cosign-meta-migration.js +123 -0
  24. package/src/admin-client.js +0 -223
  25. package/src/audit.js +0 -168
  26. package/src/cluster.js +0 -654
  27. package/src/control-db.js +0 -330
  28. package/src/daemon-control.js +0 -468
  29. package/src/daemon-shared.js +0 -18
  30. package/src/daemon-tcp.js +0 -297
  31. package/src/daemon.js +0 -709
  32. package/src/dashboard.js +0 -217
  33. package/src/fingerprint.js +0 -479
  34. package/src/gc.js +0 -351
  35. package/src/pg-wire.js +0 -869
  36. package/src/protocol.js +0 -389
  37. package/src/restore.js +0 -574
  38. package/src/router.js +0 -546
  39. package/src/sdk.js +0 -137
  40. package/src/stats-collector.js +0 -453
  41. package/src/stats-dashboard.js +0 -401
  42. package/src/sync.js +0 -335
  43. package/src/tenancy.js +0 -75
  44. package/src/tokens.js +0 -102
@@ -43,6 +43,10 @@ const __installSubcommands = new Set([
43
43
  'upgrade',
44
44
  'restart',
45
45
  'ui',
46
+ // pgserve singleton (v2.4) — `pgserve-singleton-no-proxy` wish, Group 4.
47
+ // `verify` shells out to cosign + writes an HMAC cache token. Pure node
48
+ // (no bun) so it must skip the bun probe like the install surface above.
49
+ 'verify',
46
50
  ]);
47
51
  if (__subcommand && __installSubcommands.has(__subcommand)) {
48
52
  const cli = require(path.join(__dirname, '..', 'src', 'cli-install.cjs'));
@@ -65,10 +69,11 @@ if (__subcommand && __installSubcommands.has(__subcommand)) {
65
69
  process.exit(typeof result === 'number' ? result : 0);
66
70
  }
67
71
  if (__subcommand === 'serve') {
68
- // Alias `serve` `daemon` so the wish's canonical command name maps
69
- // cleanly to the existing long-lived process. Replacing argv preserves
70
- // any flags the operator (or pm2) passed after `serve`.
71
- process.argv[2] = 'daemon';
72
+ // pgserve singleton (v2.4): the bun-proxy daemon mode is gone. `serve`
73
+ // now aliases to `postmaster` — the direct postgres-supervision entry
74
+ // point. Replacing argv preserves any flags the operator (or pm2) passed
75
+ // after `serve`.
76
+ process.argv[2] = 'postmaster';
72
77
  }
73
78
 
74
79
  // Detect platform