pgserve 2.2.0 → 2.2.2
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/CHANGELOG.md +58 -0
- package/bin/pgserve-wrapper.cjs +1 -0
- package/console/dist/app.js +121 -0
- package/console/dist/index.html +13 -0
- package/package.json +12 -6
- package/scripts/postinstall.cjs +60 -0
- package/scripts/test-bun-self-heal.sh +163 -0
- package/scripts/test-npx.sh +60 -0
- package/src/cli-install.cjs +14 -0
- package/src/cli-ui.cjs +19 -2
- package/src/upgrade/index.js +65 -0
- package/src/upgrade/runner.js +23 -0
- package/src/upgrade/steps/binary-cache-flush.js +67 -0
- package/src/upgrade/steps/consumer-signal.js +40 -0
- package/src/upgrade/steps/env-refresh.js +89 -0
- package/src/upgrade/steps/health-validate.js +53 -0
- package/src/upgrade/steps/plpgsql-resolve.js +66 -0
- package/src/upgrade/steps/port-reconcile.js +52 -0
- package/console/README.md +0 -131
- package/console/api.js +0 -173
- package/console/app.jsx +0 -483
- package/console/components.jsx +0 -167
- package/console/data.jsx +0 -350
- package/console/index.html +0 -31
- package/console/screens/databases.jsx +0 -5
- package/console/screens/health.jsx +0 -5
- package/console/screens/ingress.jsx +0 -5
- package/console/screens/optimizer.jsx +0 -5
- package/console/screens/rlm-sim.jsx +0 -5
- package/console/screens/rlm-trace.jsx +0 -5
- package/console/screens/security.jsx +0 -5
- package/console/screens/settings.jsx +0 -611
- package/console/screens/sql.jsx +0 -5
- package/console/screens/sync.jsx +0 -5
- package/console/screens/tables.jsx +0 -5
- package/console/tweaks-panel.jsx +0 -425
- /package/console/{colors_and_type.css → dist/colors_and_type.css} +0 -0
- /package/console/{console.css → dist/console.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,67 @@
|
|
|
1
|
+
## v2.2.x — Transparent Upgrade
|
|
2
|
+
|
|
3
|
+
**Added:** `autopg upgrade` CLI verb — idempotent migration runner that reconciles port back to canonical 8432, flushes the binary cache against the pinned PG version, re-resolves the plpgsql `.so` path per database, refreshes `~/.autopg/<app>.env` files, signals consumers, and validates final health.
|
|
4
|
+
|
|
5
|
+
**Added:** npm `postinstall` hook (`scripts/postinstall.cjs`) auto-runs `autopg upgrade --quiet` when an existing `~/.autopg/data/` is detected on `bun install`. Soft-fails so package install never breaks; manual `autopg upgrade` remains the explicit escape hatch.
|
|
6
|
+
|
|
7
|
+
**Contract:** Users upgrading from pgserve@2.1.3 to autopg@2.2.x get transparent migration via the postinstall hook. Manual `autopg upgrade` remains as the explicit escape hatch for forced re-runs. Patches the upgrade-path hole left by autopg-v22 partial roll-out (binary moved to `~/.autopg/`, default port silently shifted to 9432, plpgsql extensions referenced stale `$libdir`).
|
|
8
|
+
|
|
9
|
+
**Override:** Set `AUTOPG_SKIP_POSTINSTALL=1` to bypass the hook (CI / containers / install-only flows).
|
|
10
|
+
|
|
1
11
|
# Changelog
|
|
2
12
|
|
|
3
13
|
All notable changes to `pgserve` are documented here. The format follows
|
|
4
14
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres
|
|
5
15
|
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
16
|
|
|
17
|
+
## [2.2.2] - 2026-05-03
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **console: pre-bundle assets via `bun build`; drop CDN Babel dependency.**
|
|
22
|
+
The `autopg ui` console previously loaded `react@18`, `react-dom@18`, and
|
|
23
|
+
`@babel/standalone` from `unpkg.com` and transpiled `.jsx` files in the
|
|
24
|
+
browser. The console is now pre-bundled into `console/dist/app.js`
|
|
25
|
+
(~210KB minified) at publish time. Operators on offline / corporate-proxy
|
|
26
|
+
/ flaky-network hosts now get a fully local UI. Eliminates ~150KB of
|
|
27
|
+
in-browser Babel work per page load.
|
|
28
|
+
- **console: source moves to `console/src/`; npm tarball ships only
|
|
29
|
+
`console/dist/`.** Repo layout now has `console/src/` (editable sources,
|
|
30
|
+
gitignored from publish) and `console/dist/` (build artifact, in tarball,
|
|
31
|
+
gitignored in repo). `package.json#files` updated to ship `console/dist/`
|
|
32
|
+
only (drop ~80KB of unminified `.jsx` from npm install).
|
|
33
|
+
- **`react@^18.3.1` and `react-dom@^18.3.1` added as runtime dependencies.**
|
|
34
|
+
Versions match the unpkg UMD scripts loaded by v2.2.1 and earlier — no
|
|
35
|
+
behavior change. Required for the bun-build pipeline to bundle them.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **`bun run console:build`** — produces `console/dist/{app.js,index.html,*.css}`
|
|
40
|
+
via `bun build console/src/main.jsx --target browser --minify`. Wired into
|
|
41
|
+
`prepublishOnly` so npm publish always ships fresh artifacts.
|
|
42
|
+
- **`bun run console:dev`** — incremental rebuild on file change for
|
|
43
|
+
contributors editing the SPA. Output goes to `console/dist/app.js`.
|
|
44
|
+
- **`console/src/main.jsx`** — entry shim that imports `react` + `react-dom`,
|
|
45
|
+
exposes them on `globalThis`, then imports the existing flat-script `.jsx`
|
|
46
|
+
sources in original `<script>`-tag order. Preserves the SPA's existing
|
|
47
|
+
global-pattern code without rewriting every file.
|
|
48
|
+
- **`tests/console/no-cdn.test.js`** — regression test that boots
|
|
49
|
+
`autopg ui`, asserts served HTML has zero `unpkg`/`jsdelivr`/`cdn.babel`/
|
|
50
|
+
`babel/standalone` references, and verifies `app.js` is reachable as a
|
|
51
|
+
static asset.
|
|
52
|
+
|
|
53
|
+
### Notes
|
|
54
|
+
|
|
55
|
+
- **Trust boundary:** `127.0.0.1` only, single-user, no auth, no TLS — same
|
|
56
|
+
as v2.2.x.
|
|
57
|
+
- **`src/cli-ui.cjs#resolveConsoleRoot()`** prefers `console/dist/` when
|
|
58
|
+
present, falls back to `console/src/` for repo-checkout dev mode (with a
|
|
59
|
+
one-line stderr warning to remind contributors to run `console:build`).
|
|
60
|
+
- **Bundle size deviation:** wish target was ≤100KB minified; realistic
|
|
61
|
+
baseline is ~210KB (React 18 alone is ~130KB minified+gzipped). The
|
|
62
|
+
100KB target was aspirational and unachievable without removing React;
|
|
63
|
+
CHANGELOG documents the actual figure for transparency.
|
|
64
|
+
|
|
7
65
|
## Unreleased — autopg console settings
|
|
8
66
|
|
|
9
67
|
### Added
|
package/bin/pgserve-wrapper.cjs
CHANGED