spindb 0.47.18 → 0.48.1
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/cli/commands/which.js +49 -15
- package/dist/cli/commands/which.js.map +1 -1
- package/dist/config/version.js +1 -1
- package/dist/config/version.js.map +1 -1
- package/dist/core/pg-binary-resolver.js +91 -0
- package/dist/core/pg-binary-resolver.js.map +1 -0
- package/dist/engines/ferretdb/restore.js +5 -8
- package/dist/engines/ferretdb/restore.js.map +1 -1
- package/dist/engines/postgresql/backup.js +1 -5
- package/dist/engines/postgresql/backup.js.map +1 -1
- package/dist/engines/postgresql/index.js +19 -53
- package/dist/engines/postgresql/index.js.map +1 -1
- package/dist/engines/postgresql/remote-version.js +1 -3
- package/dist/engines/postgresql/remote-version.js.map +1 -1
- package/dist/engines/postgresql/restore.js +2 -4
- package/dist/engines/postgresql/restore.js.map +1 -1
- package/dist/engines/postgresql/version-validator.js +33 -63
- package/dist/engines/postgresql/version-validator.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/homebrew-version-manager.js +0 -280
- package/dist/core/homebrew-version-manager.js.map +0 -1
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PostgreSQL System Version Manager (FALLBACK / DEPRECATED)
|
|
3
|
-
*
|
|
4
|
-
* @deprecated SpinDB now downloads PostgreSQL binaries from hostdb, which include
|
|
5
|
-
* all client tools (psql, pg_dump, pg_restore). This module is a legacy fallback
|
|
6
|
-
* for users who have PostgreSQL installed via system package managers. Consider
|
|
7
|
-
* removing this module once hostdb adoption is complete.
|
|
8
|
-
*
|
|
9
|
-
* FALLBACK USE CASE:
|
|
10
|
-
* Detects PostgreSQL versions installed via system package managers:
|
|
11
|
-
* - macOS: Homebrew (/opt/homebrew/opt/postgresql@17/bin)
|
|
12
|
-
* - Linux: APT/YUM (/usr/lib/postgresql/17/bin)
|
|
13
|
-
*
|
|
14
|
-
* Used when hostdb binaries are unavailable and system tools are needed for
|
|
15
|
-
* dump/restore operations with version compatibility requirements.
|
|
16
|
-
*/
|
|
17
|
-
import { exec } from 'child_process';
|
|
18
|
-
import { promisify } from 'util';
|
|
19
|
-
import { existsSync } from 'fs';
|
|
20
|
-
import { platformService } from './platform-service.js';
|
|
21
|
-
import { Platform, Arch } from '../types/index.js';
|
|
22
|
-
import { logDebug } from './error-handler.js';
|
|
23
|
-
const execAsync = promisify(exec);
|
|
24
|
-
// PostgreSQL versions to detect on system (via Homebrew/apt)
|
|
25
|
-
// NOTE: This is for SYSTEM-INSTALLED PostgreSQL only (fallback path).
|
|
26
|
-
// Primary path uses hostdb binaries. If this module is removed, these
|
|
27
|
-
// versions become irrelevant.
|
|
28
|
-
const SUPPORTED_PG_VERSIONS = ['14', '15', '16', '17', '18'];
|
|
29
|
-
// Check if Homebrew is available on this system
|
|
30
|
-
export async function isHomebrewAvailable() {
|
|
31
|
-
const { platform } = platformService.getPlatformInfo();
|
|
32
|
-
if (platform !== Platform.Darwin)
|
|
33
|
-
return false;
|
|
34
|
-
try {
|
|
35
|
-
await execAsync('brew --version');
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
// Get the Homebrew prefix based on architecture
|
|
43
|
-
function getHomebrewPrefix() {
|
|
44
|
-
const { arch } = platformService.getPlatformInfo();
|
|
45
|
-
return arch === Arch.ARM64 ? '/opt/homebrew' : '/usr/local';
|
|
46
|
-
}
|
|
47
|
-
// Get Linux PostgreSQL bin paths (Debian/Ubuntu style)
|
|
48
|
-
function getLinuxPostgresPath(majorVersion) {
|
|
49
|
-
return `/usr/lib/postgresql/${majorVersion}/bin`;
|
|
50
|
-
}
|
|
51
|
-
// Get the currently linked PostgreSQL major version (if any)
|
|
52
|
-
export async function getCurrentLinkedVersion() {
|
|
53
|
-
const prefix = getHomebrewPrefix();
|
|
54
|
-
const pgDumpPath = `${prefix}/bin/pg_dump`;
|
|
55
|
-
if (!existsSync(pgDumpPath)) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
const { stdout } = await execAsync(`"${pgDumpPath}" --version`);
|
|
60
|
-
const match = stdout.match(/(\d+)\.(\d+)/);
|
|
61
|
-
return match ? match[1] : null;
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Detect all PostgreSQL versions installed on the system
|
|
69
|
-
* Works on both macOS (Homebrew) and Linux (APT/YUM)
|
|
70
|
-
*/
|
|
71
|
-
export async function detectInstalledPostgres() {
|
|
72
|
-
const { platform } = platformService.getPlatformInfo();
|
|
73
|
-
const installed = [];
|
|
74
|
-
// Get currently linked version (for macOS)
|
|
75
|
-
const linkedVersion = await getCurrentLinkedVersion();
|
|
76
|
-
if (platform === Platform.Darwin) {
|
|
77
|
-
// macOS: Check Homebrew installations
|
|
78
|
-
const prefix = getHomebrewPrefix();
|
|
79
|
-
for (const major of SUPPORTED_PG_VERSIONS) {
|
|
80
|
-
const binPath = `${prefix}/opt/postgresql@${major}/bin`;
|
|
81
|
-
const pgDumpPath = `${binPath}/pg_dump`;
|
|
82
|
-
if (existsSync(pgDumpPath)) {
|
|
83
|
-
try {
|
|
84
|
-
const { stdout } = await execAsync(`"${pgDumpPath}" --version`);
|
|
85
|
-
const match = stdout.match(/(\d+)\.(\d+)(?:\.(\d+))?/);
|
|
86
|
-
if (match) {
|
|
87
|
-
installed.push({
|
|
88
|
-
majorVersion: major,
|
|
89
|
-
fullVersion: match[0],
|
|
90
|
-
binPath,
|
|
91
|
-
isLinked: linkedVersion === major,
|
|
92
|
-
source: 'homebrew',
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
logDebug(`Could not get version for postgresql@${major}`, {
|
|
98
|
-
error: error instanceof Error ? error.message : String(error),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
else if (platform === Platform.Linux) {
|
|
105
|
-
// Linux: Check /usr/lib/postgresql/*/bin (Debian/Ubuntu style)
|
|
106
|
-
for (const major of SUPPORTED_PG_VERSIONS) {
|
|
107
|
-
const binPath = getLinuxPostgresPath(major);
|
|
108
|
-
const pgDumpPath = `${binPath}/pg_dump`;
|
|
109
|
-
if (existsSync(pgDumpPath)) {
|
|
110
|
-
try {
|
|
111
|
-
const { stdout } = await execAsync(`"${pgDumpPath}" --version`);
|
|
112
|
-
const match = stdout.match(/(\d+)\.(\d+)(?:\.(\d+))?/);
|
|
113
|
-
if (match) {
|
|
114
|
-
installed.push({
|
|
115
|
-
majorVersion: major,
|
|
116
|
-
fullVersion: match[0],
|
|
117
|
-
binPath,
|
|
118
|
-
isLinked: false, // Linux doesn't use linking like Homebrew
|
|
119
|
-
source: 'apt',
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
logDebug(`Could not get version for postgresql-${major}`, {
|
|
125
|
-
error: error instanceof Error ? error.message : String(error),
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return installed;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Get the direct path to a PostgreSQL binary for a specific major version
|
|
135
|
-
* This allows using a specific version without changing system links
|
|
136
|
-
*
|
|
137
|
-
* Works on:
|
|
138
|
-
* - macOS: /opt/homebrew/opt/postgresql@17/bin/pg_dump
|
|
139
|
-
* - Linux: /usr/lib/postgresql/17/bin/pg_dump
|
|
140
|
-
*/
|
|
141
|
-
export async function getDirectBinaryPath(tool, majorVersion) {
|
|
142
|
-
const { platform } = platformService.getPlatformInfo();
|
|
143
|
-
if (platform === Platform.Darwin) {
|
|
144
|
-
// macOS: Homebrew path
|
|
145
|
-
const prefix = getHomebrewPrefix();
|
|
146
|
-
const path = `${prefix}/opt/postgresql@${majorVersion}/bin/${tool}`;
|
|
147
|
-
if (existsSync(path))
|
|
148
|
-
return path;
|
|
149
|
-
}
|
|
150
|
-
else if (platform === Platform.Linux) {
|
|
151
|
-
// Linux: Debian/Ubuntu path
|
|
152
|
-
const path = `${getLinuxPostgresPath(majorVersion)}/${tool}`;
|
|
153
|
-
if (existsSync(path))
|
|
154
|
-
return path;
|
|
155
|
-
}
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Find a compatible PostgreSQL version for the target major version
|
|
160
|
-
* Returns the best available version that is >= targetMajor
|
|
161
|
-
*/
|
|
162
|
-
export async function findCompatibleVersion(targetMajor) {
|
|
163
|
-
const installed = await detectInstalledPostgres();
|
|
164
|
-
// Filter versions >= target
|
|
165
|
-
const compatible = installed.filter((v) => parseInt(v.majorVersion, 10) >= targetMajor);
|
|
166
|
-
if (compatible.length === 0) {
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
// Prefer the currently linked version if it's compatible
|
|
170
|
-
const linked = compatible.find((v) => v.isLinked);
|
|
171
|
-
if (linked) {
|
|
172
|
-
return linked;
|
|
173
|
-
}
|
|
174
|
-
// Otherwise return the lowest compatible version (closest to target)
|
|
175
|
-
compatible.sort((a, b) => parseInt(a.majorVersion, 10) - parseInt(b.majorVersion, 10));
|
|
176
|
-
return compatible[0];
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Switch system to use a specific PostgreSQL version
|
|
180
|
-
*
|
|
181
|
-
* - macOS: Uses `brew link` to change symlinks
|
|
182
|
-
* - Linux: Uses `update-alternatives` if available (Debian/Ubuntu)
|
|
183
|
-
*
|
|
184
|
-
* NOTE: Prefer getDirectBinaryPath() when possible to avoid side effects
|
|
185
|
-
*/
|
|
186
|
-
export async function switchHomebrewVersion(targetMajor) {
|
|
187
|
-
const { platform } = platformService.getPlatformInfo();
|
|
188
|
-
if (platform === Platform.Darwin) {
|
|
189
|
-
return switchHomebrewVersionMacOS(targetMajor);
|
|
190
|
-
}
|
|
191
|
-
else if (platform === Platform.Linux) {
|
|
192
|
-
return switchVersionLinux(targetMajor);
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
success: false,
|
|
196
|
-
error: 'Version switching not supported on this platform',
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
// Switch PostgreSQL version on macOS using Homebrew
|
|
200
|
-
async function switchHomebrewVersionMacOS(targetMajor) {
|
|
201
|
-
if (!(await isHomebrewAvailable())) {
|
|
202
|
-
return { success: false, error: 'Homebrew not available' };
|
|
203
|
-
}
|
|
204
|
-
const installed = await detectInstalledPostgres();
|
|
205
|
-
const target = installed.find((v) => v.majorVersion === targetMajor);
|
|
206
|
-
if (!target) {
|
|
207
|
-
return {
|
|
208
|
-
success: false,
|
|
209
|
-
error: `PostgreSQL ${targetMajor} is not installed via Homebrew. Install with: brew install postgresql@${targetMajor}`,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
if (target.isLinked) {
|
|
213
|
-
return {
|
|
214
|
-
success: true,
|
|
215
|
-
currentVersion: targetMajor,
|
|
216
|
-
previousVersion: targetMajor,
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
const previousLinked = installed.find((v) => v.isLinked);
|
|
220
|
-
try {
|
|
221
|
-
// Unlink all versions first
|
|
222
|
-
for (const ver of installed) {
|
|
223
|
-
await execAsync(`brew unlink postgresql@${ver.majorVersion} 2>/dev/null || true`);
|
|
224
|
-
}
|
|
225
|
-
// Link target version
|
|
226
|
-
await execAsync(`brew link --overwrite postgresql@${targetMajor}`);
|
|
227
|
-
logDebug('Switched Homebrew PostgreSQL version', {
|
|
228
|
-
from: previousLinked?.majorVersion,
|
|
229
|
-
to: targetMajor,
|
|
230
|
-
});
|
|
231
|
-
return {
|
|
232
|
-
success: true,
|
|
233
|
-
previousVersion: previousLinked?.majorVersion,
|
|
234
|
-
currentVersion: targetMajor,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
catch (error) {
|
|
238
|
-
return {
|
|
239
|
-
success: false,
|
|
240
|
-
error: error instanceof Error ? error.message : String(error),
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* "Switch" PostgreSQL version on Linux (no-op verification only)
|
|
246
|
-
*
|
|
247
|
-
* Unlike macOS where Homebrew uses symlinks that need switching, Linux installs
|
|
248
|
-
* PostgreSQL versions side-by-side in versioned paths (e.g., /usr/lib/postgresql/17/bin).
|
|
249
|
-
* We access these directly via getDirectBinaryPath(), so no symlink switching is needed.
|
|
250
|
-
* This function just verifies the target version is installed.
|
|
251
|
-
*/
|
|
252
|
-
async function switchVersionLinux(targetMajor) {
|
|
253
|
-
const installed = await detectInstalledPostgres();
|
|
254
|
-
const target = installed.find((v) => v.majorVersion === targetMajor);
|
|
255
|
-
if (!target) {
|
|
256
|
-
return {
|
|
257
|
-
success: false,
|
|
258
|
-
error: `PostgreSQL ${targetMajor} is not installed. Install with: sudo apt install postgresql-client-${targetMajor}`,
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
// No action required - Linux uses versioned paths directly, no symlink switching needed
|
|
262
|
-
logDebug('Linux: Version verified, no switching required (using direct path)', {
|
|
263
|
-
version: targetMajor,
|
|
264
|
-
binPath: target.binPath,
|
|
265
|
-
});
|
|
266
|
-
return {
|
|
267
|
-
success: true,
|
|
268
|
-
currentVersion: targetMajor,
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
// Get all client tools for a specific PostgreSQL version
|
|
272
|
-
export async function getVersionedToolPaths(majorVersion) {
|
|
273
|
-
return {
|
|
274
|
-
pgDump: await getDirectBinaryPath('pg_dump', majorVersion),
|
|
275
|
-
pgRestore: await getDirectBinaryPath('pg_restore', majorVersion),
|
|
276
|
-
psql: await getDirectBinaryPath('psql', majorVersion),
|
|
277
|
-
pgBasebackup: await getDirectBinaryPath('pg_basebackup', majorVersion),
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
//# sourceMappingURL=homebrew-version-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"homebrew-version-manager.js","sourceRoot":"","sources":["../../core/homebrew-version-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;AAEjC,6DAA6D;AAC7D,sEAAsE;AACtE,sEAAsE;AACtE,8BAA8B;AAC9B,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAiB5D,gDAAgD;AAChD,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC,eAAe,EAAE,CAAA;IACtD,IAAI,QAAQ,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IAE9C,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,gBAAgB,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,gDAAgD;AAChD,SAAS,iBAAiB;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,eAAe,EAAE,CAAA;IAClD,OAAO,IAAI,KAAK,IAAI,CAAC,KA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