spindb 0.49.0 → 0.50.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.
- package/README.md +6 -3
- package/dist/cli/commands/create.js +10 -0
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/engines.js +26 -4
- package/dist/cli/commands/engines.js.map +1 -1
- package/dist/cli/commands/menu/backup-handlers.js +8 -1
- package/dist/cli/commands/menu/backup-handlers.js.map +1 -1
- package/dist/cli/commands/menu/container-handlers.js +9 -1
- package/dist/cli/commands/menu/container-handlers.js.map +1 -1
- package/dist/cli/commands/start.js +24 -1
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/ui/prompts.js +6 -3
- package/dist/cli/ui/prompts.js.map +1 -1
- package/dist/config/engine-defaults.js +25 -26
- package/dist/config/engine-defaults.js.map +1 -1
- package/dist/config/engines-registry.js +0 -46
- package/dist/config/engines-registry.js.map +1 -1
- package/dist/config/engines.json +132 -101
- package/dist/config/version.js +1 -1
- package/dist/core/container-manager.js +18 -4
- package/dist/core/container-manager.js.map +1 -1
- package/dist/core/hostdb-metadata.js +57 -14
- package/dist/core/hostdb-metadata.js.map +1 -1
- package/dist/core/version-utils.js +35 -0
- package/dist/core/version-utils.js.map +1 -1
- package/dist/engines/base-engine.js +12 -0
- package/dist/engines/base-engine.js.map +1 -1
- package/dist/engines/clickhouse/version-maps.js +43 -55
- package/dist/engines/clickhouse/version-maps.js.map +1 -1
- package/dist/engines/cockroachdb/version-maps.js +26 -25
- package/dist/engines/cockroachdb/version-maps.js.map +1 -1
- package/dist/engines/couchdb/version-maps.js +28 -47
- package/dist/engines/couchdb/version-maps.js.map +1 -1
- package/dist/engines/duckdb/index.js +3 -0
- package/dist/engines/duckdb/index.js.map +1 -1
- package/dist/engines/duckdb/version-maps.js +28 -48
- package/dist/engines/duckdb/version-maps.js.map +1 -1
- package/dist/engines/ferretdb/version-maps.js +39 -115
- package/dist/engines/ferretdb/version-maps.js.map +1 -1
- package/dist/engines/influxdb/version-maps.js +28 -44
- package/dist/engines/influxdb/version-maps.js.map +1 -1
- package/dist/engines/libsql/version-maps.js +28 -43
- package/dist/engines/libsql/version-maps.js.map +1 -1
- package/dist/engines/mariadb/version-maps.js +34 -54
- package/dist/engines/mariadb/version-maps.js.map +1 -1
- package/dist/engines/meilisearch/version-maps.js +28 -49
- package/dist/engines/meilisearch/version-maps.js.map +1 -1
- package/dist/engines/mongodb/version-maps.js +34 -70
- package/dist/engines/mongodb/version-maps.js.map +1 -1
- package/dist/engines/mysql/version-maps.js +37 -65
- package/dist/engines/mysql/version-maps.js.map +1 -1
- package/dist/engines/postgresql/version-maps.js +28 -71
- package/dist/engines/postgresql/version-maps.js.map +1 -1
- package/dist/engines/qdrant/version-maps.js +28 -47
- package/dist/engines/qdrant/version-maps.js.map +1 -1
- package/dist/engines/questdb/version-maps.js +24 -25
- package/dist/engines/questdb/version-maps.js.map +1 -1
- package/dist/engines/redis/version-maps.js +28 -51
- package/dist/engines/redis/version-maps.js.map +1 -1
- package/dist/engines/sqlite/index.js +3 -0
- package/dist/engines/sqlite/index.js.map +1 -1
- package/dist/engines/sqlite/version-maps.js +32 -47
- package/dist/engines/sqlite/version-maps.js.map +1 -1
- package/dist/engines/surrealdb/version-maps.js +26 -24
- package/dist/engines/surrealdb/version-maps.js.map +1 -1
- package/dist/engines/tigerbeetle/version-maps.js +32 -47
- package/dist/engines/tigerbeetle/version-maps.js.map +1 -1
- package/dist/engines/typedb/version-maps.js +30 -27
- package/dist/engines/typedb/version-maps.js.map +1 -1
- package/dist/engines/valkey/version-maps.js +28 -52
- package/dist/engines/valkey/version-maps.js.map +1 -1
- package/dist/engines/weaviate/version-maps.js +28 -47
- package/dist/engines/weaviate/version-maps.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SurrealDB
|
|
2
|
+
* SurrealDB Version Maps
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
// Full version map for SurrealDB
|
|
8
|
-
export const SURREALDB_VERSION_MAP = {
|
|
9
|
-
'2': '2.3.2',
|
|
10
|
-
'2.3': '2.3.2',
|
|
11
|
-
'2.3.2': '2.3.2',
|
|
12
|
-
};
|
|
13
|
-
// Supported major versions (for CLI display)
|
|
14
|
-
export const SUPPORTED_MAJOR_VERSIONS = ['2'];
|
|
15
|
-
// Default version
|
|
16
|
-
export const DEFAULT_VERSION = '2';
|
|
17
|
-
/**
|
|
18
|
-
* Normalize a version string to its full version
|
|
19
|
-
* e.g., '2' -> '2.3.2', '2.3' -> '2.3.2'
|
|
4
|
+
* Thin wrapper around the `hostdb` npm package. See engines/sqlite/version-maps.ts
|
|
5
|
+
* for the architecture rationale — hostdb is the single source of truth.
|
|
20
6
|
*/
|
|
7
|
+
import { resolveVersion as hostdbResolveVersion, getSupportedMajorVersions, listVersions, } from 'hostdb';
|
|
8
|
+
const ENGINE = 'surrealdb';
|
|
9
|
+
function buildVersionMap() {
|
|
10
|
+
const map = {};
|
|
11
|
+
for (const major of getSupportedMajorVersions(ENGINE)) {
|
|
12
|
+
const r = hostdbResolveVersion(ENGINE, major);
|
|
13
|
+
if (r)
|
|
14
|
+
map[major] = r;
|
|
15
|
+
}
|
|
16
|
+
for (const minor of listVersions(ENGINE, { format: 'major-minor' })) {
|
|
17
|
+
const r = hostdbResolveVersion(ENGINE, minor);
|
|
18
|
+
if (r)
|
|
19
|
+
map[minor] = r;
|
|
20
|
+
}
|
|
21
|
+
for (const full of listVersions(ENGINE, { format: 'full' })) {
|
|
22
|
+
map[full] = full;
|
|
23
|
+
}
|
|
24
|
+
return map;
|
|
25
|
+
}
|
|
26
|
+
export const SURREALDB_VERSION_MAP = buildVersionMap();
|
|
27
|
+
export const SUPPORTED_MAJOR_VERSIONS = getSupportedMajorVersions(ENGINE);
|
|
28
|
+
export const DEFAULT_VERSION = SUPPORTED_MAJOR_VERSIONS[0] ?? '2';
|
|
21
29
|
export function normalizeVersion(version) {
|
|
22
|
-
return
|
|
30
|
+
return hostdbResolveVersion(ENGINE, version) ?? version;
|
|
23
31
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Check if a version is supported
|
|
26
|
-
*/
|
|
27
32
|
export function isVersionSupported(version) {
|
|
28
33
|
return version in SURREALDB_VERSION_MAP;
|
|
29
34
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Get the latest patch version for a major version
|
|
32
|
-
*/
|
|
33
35
|
export function getLatestPatch(majorVersion) {
|
|
34
36
|
return SURREALDB_VERSION_MAP[majorVersion];
|
|
35
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/surrealdb/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,
|
|
1
|
+
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/surrealdb/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,EACzB,YAAY,GACb,MAAM,QAAQ,CAAA;AAEf,MAAM,MAAM,GAAG,WAAW,CAAA;AAE1B,SAAS,eAAe;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAA2B,eAAe,EAAE,CAAA;AAE9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAA;AAEzE,MAAM,CAAC,MAAM,eAAe,GAAG,wBAAwB,CAAC,CAAC,CAAC,IAAI,GAAG,CAAA;AAEjE,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,OAAO,CAAA;AACzD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,OAAO,IAAI,qBAAqB,CAAA;AACzC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,YAAoB;IACjD,OAAO,qBAAqB,CAAC,YAAY,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -1,59 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TigerBeetle Version Maps
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* https://github.com/robertjbass/hostdb/blob/main/releases.json
|
|
4
|
+
* Thin wrapper around the `hostdb` npm package. See engines/sqlite/version-maps.ts
|
|
5
|
+
* for the architecture rationale — hostdb is the single source of truth.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* 2. Update TIGERBEETLE_VERSION_MAP to match
|
|
7
|
+
* SUPPORTED_MAJOR_VERSIONS is 2-part (e.g., '0.16') to preserve the existing
|
|
8
|
+
* spindb convention. The 1-part key '0' still resolves via the MAP.
|
|
11
9
|
*/
|
|
10
|
+
import { resolveVersion as hostdbResolveVersion, getSupportedMajorVersions, listVersions, } from 'hostdb';
|
|
12
11
|
import { logDebug } from '../../core/error-handler.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* Get the full version string for a major version.
|
|
36
|
-
*
|
|
37
|
-
* @param majorVersion - Major version (e.g., '0.16')
|
|
38
|
-
* @returns Full version string (e.g., '0.16.70') or null if not supported
|
|
39
|
-
*/
|
|
12
|
+
const ENGINE = 'tigerbeetle';
|
|
13
|
+
function buildVersionMap() {
|
|
14
|
+
const map = {};
|
|
15
|
+
for (const major of getSupportedMajorVersions(ENGINE)) {
|
|
16
|
+
const r = hostdbResolveVersion(ENGINE, major);
|
|
17
|
+
if (r)
|
|
18
|
+
map[major] = r;
|
|
19
|
+
}
|
|
20
|
+
for (const minor of listVersions(ENGINE, { format: 'major-minor' })) {
|
|
21
|
+
const r = hostdbResolveVersion(ENGINE, minor);
|
|
22
|
+
if (r)
|
|
23
|
+
map[minor] = r;
|
|
24
|
+
}
|
|
25
|
+
for (const full of listVersions(ENGINE, { format: 'full' })) {
|
|
26
|
+
map[full] = full;
|
|
27
|
+
}
|
|
28
|
+
return map;
|
|
29
|
+
}
|
|
30
|
+
export const TIGERBEETLE_VERSION_MAP = buildVersionMap();
|
|
31
|
+
export const SUPPORTED_MAJOR_VERSIONS = listVersions(ENGINE, {
|
|
32
|
+
format: 'major-minor',
|
|
33
|
+
});
|
|
40
34
|
export function getFullVersion(majorVersion) {
|
|
41
|
-
return
|
|
35
|
+
return hostdbResolveVersion(ENGINE, majorVersion);
|
|
42
36
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Normalize a version string to X.Y.Z format.
|
|
45
|
-
*
|
|
46
|
-
* @param version - Version string (e.g., '0', '0.16', '0.16.70')
|
|
47
|
-
* @returns Normalized version (e.g., '0.16.70')
|
|
48
|
-
*/
|
|
49
37
|
export function normalizeVersion(version) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
// Unknown version - log debug and return as-is
|
|
56
|
-
logDebug(`TigerBeetle version '${version}' not in version map, may not be available in hostdb`);
|
|
38
|
+
const resolved = hostdbResolveVersion(ENGINE, version);
|
|
39
|
+
if (resolved)
|
|
40
|
+
return resolved;
|
|
41
|
+
logDebug(`TigerBeetle version '${version}' not in hostdb, may not be available for download`);
|
|
57
42
|
return version;
|
|
58
43
|
}
|
|
59
44
|
//# sourceMappingURL=version-maps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/tigerbeetle/version-maps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/tigerbeetle/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,EACzB,YAAY,GACb,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,MAAM,MAAM,GAAG,aAAa,CAAA;AAE5B,SAAS,eAAe;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAA2B,eAAe,EAAE,CAAA;AAEhF,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC,MAAM,EAAE;IAC3D,MAAM,EAAE,aAAa;CACtB,CAAC,CAAA;AAEF,MAAM,UAAU,cAAc,CAAC,YAAoB;IACjD,OAAO,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAC7B,QAAQ,CACN,wBAAwB,OAAO,oDAAoD,CACpF,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TypeDB
|
|
2
|
+
* TypeDB Version Maps
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Thin wrapper around the `hostdb` npm package. See engines/sqlite/version-maps.ts
|
|
5
|
+
* for the architecture rationale — hostdb is the single source of truth.
|
|
6
6
|
*/
|
|
7
|
+
import { resolveVersion as hostdbResolveVersion, getSupportedMajorVersions, listVersions, } from 'hostdb';
|
|
7
8
|
import { logDebug } from '../../core/error-handler.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const SUPPORTED_MAJOR_VERSIONS = ['3'];
|
|
16
|
-
// Default version
|
|
17
|
-
export const DEFAULT_VERSION = '3';
|
|
18
|
-
/**
|
|
19
|
-
* Normalize a version string to its full version
|
|
20
|
-
* e.g., '3' -> '3.8.0', '3.8' -> '3.8.0'
|
|
21
|
-
*/
|
|
22
|
-
export function normalizeVersion(version) {
|
|
23
|
-
if (!TYPEDB_VERSION_MAP[version]) {
|
|
24
|
-
logDebug(`TypeDB version "${version}" not found in TYPEDB_VERSION_MAP (available: ${Object.keys(TYPEDB_VERSION_MAP).join(', ')}), using as-is`);
|
|
9
|
+
const ENGINE = 'typedb';
|
|
10
|
+
function buildVersionMap() {
|
|
11
|
+
const map = {};
|
|
12
|
+
for (const major of getSupportedMajorVersions(ENGINE)) {
|
|
13
|
+
const r = hostdbResolveVersion(ENGINE, major);
|
|
14
|
+
if (r)
|
|
15
|
+
map[major] = r;
|
|
25
16
|
}
|
|
26
|
-
|
|
17
|
+
for (const minor of listVersions(ENGINE, { format: 'major-minor' })) {
|
|
18
|
+
const r = hostdbResolveVersion(ENGINE, minor);
|
|
19
|
+
if (r)
|
|
20
|
+
map[minor] = r;
|
|
21
|
+
}
|
|
22
|
+
for (const full of listVersions(ENGINE, { format: 'full' })) {
|
|
23
|
+
map[full] = full;
|
|
24
|
+
}
|
|
25
|
+
return map;
|
|
26
|
+
}
|
|
27
|
+
export const TYPEDB_VERSION_MAP = buildVersionMap();
|
|
28
|
+
export const SUPPORTED_MAJOR_VERSIONS = getSupportedMajorVersions(ENGINE);
|
|
29
|
+
export const DEFAULT_VERSION = SUPPORTED_MAJOR_VERSIONS[0] ?? '3';
|
|
30
|
+
export function normalizeVersion(version) {
|
|
31
|
+
const resolved = hostdbResolveVersion(ENGINE, version);
|
|
32
|
+
if (resolved)
|
|
33
|
+
return resolved;
|
|
34
|
+
logDebug(`TypeDB version "${version}" not in hostdb (available majors: ${SUPPORTED_MAJOR_VERSIONS.join(', ')}), using as-is`);
|
|
35
|
+
return version;
|
|
27
36
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Check if a version is supported
|
|
30
|
-
*/
|
|
31
37
|
export function isVersionSupported(version) {
|
|
32
38
|
return Object.hasOwn(TYPEDB_VERSION_MAP, version);
|
|
33
39
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Get the latest patch version for a major version
|
|
36
|
-
*/
|
|
37
40
|
export function getLatestPatch(majorVersion) {
|
|
38
41
|
return TYPEDB_VERSION_MAP[majorVersion];
|
|
39
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/typedb/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,
|
|
1
|
+
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/typedb/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,EACzB,YAAY,GACb,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,MAAM,MAAM,GAAG,QAAQ,CAAA;AAEvB,SAAS,eAAe;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,Y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5
|
-
*
|
|
6
|
-
* https://github.com/robertjbass/hostdb/blob/main/releases.json
|
|
7
|
-
*
|
|
8
|
-
* When updating versions:
|
|
9
|
-
* 1. Check hostdb releases.json for available versions
|
|
10
|
-
* 2. Update VALKEY_VERSION_MAP to match
|
|
4
|
+
* Thin wrapper around the `hostdb` npm package. See engines/sqlite/version-maps.ts
|
|
5
|
+
* for the architecture rationale — hostdb is the single source of truth.
|
|
11
6
|
*/
|
|
7
|
+
import { resolveVersion as hostdbResolveVersion, getSupportedMajorVersions, listVersions, } from 'hostdb';
|
|
12
8
|
import { logDebug } from '../../core/error-handler.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
export const SUPPORTED_MAJOR_VERSIONS = ['8', '9'];
|
|
35
|
-
/**
|
|
36
|
-
* Get the full version string for a major version.
|
|
37
|
-
*
|
|
38
|
-
* @param majorVersion - Major version (e.g., '8', '9')
|
|
39
|
-
* @returns Full version string (e.g., '8.0.6') or null if not supported
|
|
40
|
-
*/
|
|
9
|
+
const ENGINE = 'valkey';
|
|
10
|
+
function buildVersionMap() {
|
|
11
|
+
const map = {};
|
|
12
|
+
for (const major of getSupportedMajorVersions(ENGINE)) {
|
|
13
|
+
const r = hostdbResolveVersion(ENGINE, major);
|
|
14
|
+
if (r)
|
|
15
|
+
map[major] = r;
|
|
16
|
+
}
|
|
17
|
+
for (const minor of listVersions(ENGINE, { format: 'major-minor' })) {
|
|
18
|
+
const r = hostdbResolveVersion(ENGINE, minor);
|
|
19
|
+
if (r)
|
|
20
|
+
map[minor] = r;
|
|
21
|
+
}
|
|
22
|
+
for (const full of listVersions(ENGINE, { format: 'full' })) {
|
|
23
|
+
map[full] = full;
|
|
24
|
+
}
|
|
25
|
+
return map;
|
|
26
|
+
}
|
|
27
|
+
export const VALKEY_VERSION_MAP = buildVersionMap();
|
|
28
|
+
export const SUPPORTED_MAJOR_VERSIONS = getSupportedMajorVersions(ENGINE);
|
|
41
29
|
export function getFullVersion(majorVersion) {
|
|
42
|
-
return
|
|
30
|
+
return hostdbResolveVersion(ENGINE, majorVersion);
|
|
43
31
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Normalize a version string to X.Y.Z format.
|
|
46
|
-
*
|
|
47
|
-
* @param version - Version string (e.g., '8', '8.0', '8.0.6')
|
|
48
|
-
* @returns Normalized version (e.g., '8.0.6')
|
|
49
|
-
*/
|
|
50
32
|
export function normalizeVersion(version) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (fullVersion) {
|
|
55
|
-
return fullVersion;
|
|
56
|
-
}
|
|
57
|
-
// Unknown version - warn and return as-is
|
|
58
|
-
// This may cause download failures if the version doesn't exist in hostdb
|
|
33
|
+
const resolved = hostdbResolveVersion(ENGINE, version);
|
|
34
|
+
if (resolved)
|
|
35
|
+
return resolved;
|
|
59
36
|
const parts = version.split('.');
|
|
60
|
-
// Validate format: must be 1-3 numeric segments (e.g., "8", "8.0", "8.0.6")
|
|
61
37
|
const isValidFormat = parts.length >= 1 &&
|
|
62
38
|
parts.length <= 3 &&
|
|
63
39
|
parts.every((p) => /^\d+$/.test(p));
|
|
@@ -65,7 +41,7 @@ export function normalizeVersion(version) {
|
|
|
65
41
|
logDebug(`Valkey version '${version}' has invalid format, may not be available in hostdb`);
|
|
66
42
|
}
|
|
67
43
|
else {
|
|
68
|
-
logDebug(`Valkey version '${version}' not in
|
|
44
|
+
logDebug(`Valkey version '${version}' not in hostdb, may not be available for download`);
|
|
69
45
|
}
|
|
70
46
|
return version;
|
|
71
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/valkey/version-maps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/valkey/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,EACzB,YAAY,GACb,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,MAAM,MAAM,GAAG,QAAQ,CAAA;AAEvB,SAAS,eAAe;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAA2B,eAAe,EAAE,CAAA;AAE3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAA;AAEzE,MAAM,UAAU,cAAc,CAAC,YAAoB;IACjD,OAAO,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE7B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAChC,MAAM,aAAa,GACjB,KAAK,CAAC,MAAM,IAAI,CAAC;QACjB,KAAK,CAAC,MAAM,IAAI,CAAC;QACjB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAErC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,QAAQ,CACN,mBAAmB,OAAO,sDAAsD,CACjF,CAAA;IACH,CAAC;SAAM,CAAC;QACN,QAAQ,CACN,mBAAmB,OAAO,oDAAoD,CAC/E,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -1,58 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Weaviate Version Maps
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* https://github.com/robertjbass/hostdb/blob/main/releases.json
|
|
7
|
-
*
|
|
8
|
-
* When updating versions:
|
|
9
|
-
* 1. Check hostdb releases.json for available versions
|
|
10
|
-
* 2. Update WEAVIATE_VERSION_MAP to match
|
|
4
|
+
* Thin wrapper around the `hostdb` npm package. See engines/sqlite/version-maps.ts
|
|
5
|
+
* for the architecture rationale — hostdb is the single source of truth.
|
|
11
6
|
*/
|
|
7
|
+
import { resolveVersion as hostdbResolveVersion, getSupportedMajorVersions, listVersions, } from 'hostdb';
|
|
12
8
|
import { logDebug } from '../../core/error-handler.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* @param majorVersion - Major version (e.g., '1')
|
|
34
|
-
* @returns Full version string (e.g., '1.35.7') or null if not supported
|
|
35
|
-
*/
|
|
9
|
+
const ENGINE = 'weaviate';
|
|
10
|
+
function buildVersionMap() {
|
|
11
|
+
const map = {};
|
|
12
|
+
for (const major of getSupportedMajorVersions(ENGINE)) {
|
|
13
|
+
const r = hostdbResolveVersion(ENGINE, major);
|
|
14
|
+
if (r)
|
|
15
|
+
map[major] = r;
|
|
16
|
+
}
|
|
17
|
+
for (const minor of listVersions(ENGINE, { format: 'major-minor' })) {
|
|
18
|
+
const r = hostdbResolveVersion(ENGINE, minor);
|
|
19
|
+
if (r)
|
|
20
|
+
map[minor] = r;
|
|
21
|
+
}
|
|
22
|
+
for (const full of listVersions(ENGINE, { format: 'full' })) {
|
|
23
|
+
map[full] = full;
|
|
24
|
+
}
|
|
25
|
+
return map;
|
|
26
|
+
}
|
|
27
|
+
export const WEAVIATE_VERSION_MAP = buildVersionMap();
|
|
28
|
+
export const SUPPORTED_MAJOR_VERSIONS = getSupportedMajorVersions(ENGINE);
|
|
36
29
|
export function getFullVersion(majorVersion) {
|
|
37
|
-
return
|
|
30
|
+
return hostdbResolveVersion(ENGINE, majorVersion);
|
|
38
31
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Normalize a version string to X.Y.Z format.
|
|
41
|
-
*
|
|
42
|
-
* @param version - Version string (e.g., '1', '1.35', '1.35.7')
|
|
43
|
-
* @returns Normalized version (e.g., '1.35.7')
|
|
44
|
-
*/
|
|
45
32
|
export function normalizeVersion(version) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (fullVersion) {
|
|
50
|
-
return fullVersion;
|
|
51
|
-
}
|
|
52
|
-
// Unknown version - warn and return as-is
|
|
53
|
-
// This may cause download failures if the version doesn't exist in hostdb
|
|
33
|
+
const resolved = hostdbResolveVersion(ENGINE, version);
|
|
34
|
+
if (resolved)
|
|
35
|
+
return resolved;
|
|
54
36
|
const parts = version.split('.');
|
|
55
|
-
// Validate format: must be 1-3 numeric segments (e.g., "1", "1.35", "1.35.7")
|
|
56
37
|
const isValidFormat = parts.length >= 1 &&
|
|
57
38
|
parts.length <= 3 &&
|
|
58
39
|
parts.every((p) => /^\d+$/.test(p));
|
|
@@ -60,7 +41,7 @@ export function normalizeVersion(version) {
|
|
|
60
41
|
logDebug(`Weaviate version '${version}' has invalid format, may not be available in hostdb`);
|
|
61
42
|
}
|
|
62
43
|
else {
|
|
63
|
-
logDebug(`Weaviate version '${version}' not in
|
|
44
|
+
logDebug(`Weaviate version '${version}' not in hostdb, may not be available for download`);
|
|
64
45
|
}
|
|
65
46
|
return version;
|
|
66
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/weaviate/version-maps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"version-maps.js","sourceRoot":"","sources":["../../../engines/weaviate/version-maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,EACzB,YAAY,GACb,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,MAAM,MAAM,GAAG,UAAU,CAAA;AAEzB,SAAS,eAAe;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC;YAAE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,CACnF,CAAA;IACH,CAAC;SAAM,CAAC;QACN,QAAQ,CACN,qBAAqB,OAAO,oDAAoD,CACjF,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spindb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"author": "Bob Bass <bob@bbass.co>",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"description": "Zero-config Docker-free local database containers. Create, backup, and clone a variety of popular databases.",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"format": "prettier --write .",
|
|
39
39
|
"check": "tsc --noEmit",
|
|
40
40
|
"lint": "eslint . && pnpm check",
|
|
41
|
-
"prepare": "husky"
|
|
41
|
+
"prepare": "husky",
|
|
42
|
+
"flip-hostdb-pin": "node scripts/flip-hostdb-pin.mjs"
|
|
42
43
|
},
|
|
43
44
|
"keywords": [
|
|
44
45
|
"hostdb",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
"dependencies": {
|
|
93
94
|
"chalk": "^5.3.0",
|
|
94
95
|
"commander": "^12.1.0",
|
|
96
|
+
"hostdb": "0.31.0",
|
|
95
97
|
"inquirer": "^9.3.7",
|
|
96
98
|
"inquirer-autocomplete-prompt": "^3.0.1",
|
|
97
99
|
"ora": "^8.1.1",
|