@automagik/omni 2.260510.1 → 2.260520.4
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/index.js +204 -158
- package/dist/lib/canonical-pgserve-binary.d.ts +36 -0
- package/dist/lib/canonical-pgserve-binary.d.ts.map +1 -0
- package/dist/lib/canonical-pgserve.d.ts.map +1 -1
- package/dist/lib/pgserve-transport.d.ts.map +1 -1
- package/dist/server/index.js +111 -111
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical pgserve binary resolver — mirror of the genie-side resolver
|
|
3
|
+
* shipped in genie@4.260520.3 (`src/lib/canonical-pgserve-binary.ts`).
|
|
4
|
+
*
|
|
5
|
+
* Background
|
|
6
|
+
* ----------
|
|
7
|
+
* The autopg-distribution-cutover-finalize wish (autopg repo) renamed the
|
|
8
|
+
* published v3 binary from `pgserve` to `autopg`. Both binaries expose an
|
|
9
|
+
* identical command surface (`install`, `port`, `url`, `status`, `restart`);
|
|
10
|
+
* only the on-disk name differs. Every omni consumer that historically
|
|
11
|
+
* hardcoded `'pgserve'` in a spawn arg now routes through this resolver
|
|
12
|
+
* so v3-only hosts (which have `autopg` on PATH but no `pgserve`) succeed
|
|
13
|
+
* instead of falling out as "binary unavailable".
|
|
14
|
+
*
|
|
15
|
+
* Resolution policy
|
|
16
|
+
* -----------------
|
|
17
|
+
* - Prefer `autopg` (v3 canonical) when present.
|
|
18
|
+
* - Fall back to `pgserve` (v2 legacy) for cutover hosts.
|
|
19
|
+
* - Return null when neither is on PATH — caller surfaces the canonical
|
|
20
|
+
* install hint via {@link canonicalPgserveInstallHint}.
|
|
21
|
+
*
|
|
22
|
+
* Lifecycle
|
|
23
|
+
* ---------
|
|
24
|
+
* - Memoized; cached value persists for the process lifetime.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the canonical pgserve binary on this host. Memoized.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolvePgserveBinary(): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Copy-paste recovery commands for the "binary not found" path. Points
|
|
32
|
+
* at the autopg v3 installer; ordered so the operator runs them
|
|
33
|
+
* top-to-bottom.
|
|
34
|
+
*/
|
|
35
|
+
export declare function canonicalPgserveInstallHint(): string[];
|
|
36
|
+
//# sourceMappingURL=canonical-pgserve-binary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-pgserve-binary.d.ts","sourceRoot":"","sources":["../../src/lib/canonical-pgserve-binary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAsBH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAYpD;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAKtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-pgserve.d.ts","sourceRoot":"","sources":["../../src/lib/canonical-pgserve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"canonical-pgserve.d.ts","sourceRoot":"","sources":["../../src/lib/canonical-pgserve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA6IH;;;;;;GAMG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWpE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iCAAiC,CACrD,WAAW,EAAE,OAAO,EACpB,GAAG,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,OAAO,CAAC,CA6BlB;AAwDD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CASnD;AAuCD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,MAAM,EAAE,kBAAkB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,MAAM,EAAE,uBAAuB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6D5F;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,kBAAkB,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoCpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgserve-transport.d.ts","sourceRoot":"","sources":["../../src/lib/pgserve-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"pgserve-transport.d.ts","sourceRoot":"","sources":["../../src/lib/pgserve-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAQH,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,OAAO,CAAC;AActC;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAIhD;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAElD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,MAAM,CAYR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CA+BzE"}
|