spindb 0.37.2 → 0.38.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/dist/cli/bin.js +9 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/commands/attach.js +102 -0
- package/dist/cli/commands/attach.js.map +1 -0
- package/dist/cli/commands/backup.js +197 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/backups.js +190 -0
- package/dist/cli/commands/backups.js.map +1 -0
- package/dist/cli/commands/clone.js +119 -0
- package/dist/cli/commands/clone.js.map +1 -0
- package/dist/cli/commands/config.js +276 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/connect.js +559 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/create.js +952 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/databases.js +485 -0
- package/dist/cli/commands/databases.js.map +1 -0
- package/dist/cli/commands/delete.js +106 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/deps.js +238 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/detach.js +81 -0
- package/dist/cli/commands/detach.js.map +1 -0
- package/dist/cli/commands/doctor.js +567 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/duckdb.js +207 -0
- package/dist/cli/commands/duckdb.js.map +1 -0
- package/dist/cli/commands/edit.js +524 -0
- package/dist/cli/commands/edit.js.map +1 -0
- package/dist/cli/commands/engines.js +1414 -0
- package/dist/cli/commands/engines.js.map +1 -0
- package/dist/cli/commands/export.js +383 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/info.js +270 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/list.js +215 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/logs.js +81 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/menu/backup-handlers.js +1202 -0
- package/dist/cli/commands/menu/backup-handlers.js.map +1 -0
- package/dist/cli/commands/menu/container-handlers.js +1788 -0
- package/dist/cli/commands/menu/container-handlers.js.map +1 -0
- package/dist/cli/commands/menu/engine-handlers.js +235 -0
- package/dist/cli/commands/menu/engine-handlers.js.map +1 -0
- package/dist/cli/commands/menu/index.js +266 -0
- package/dist/cli/commands/menu/index.js.map +1 -0
- package/dist/cli/commands/menu/settings-handlers.js +320 -0
- package/dist/cli/commands/menu/settings-handlers.js.map +1 -0
- package/dist/cli/commands/menu/shared.js +13 -0
- package/dist/cli/commands/menu/shared.js.map +1 -0
- package/dist/cli/commands/menu/shell-handlers.js +1573 -0
- package/dist/cli/commands/menu/shell-handlers.js.map +1 -0
- package/dist/cli/commands/menu/sql-handlers.js +185 -0
- package/dist/cli/commands/menu/sql-handlers.js.map +1 -0
- package/dist/cli/commands/menu/update-handlers.js +322 -0
- package/dist/cli/commands/menu/update-handlers.js.map +1 -0
- package/dist/cli/commands/menu/validators.js +9 -0
- package/dist/cli/commands/menu/validators.js.map +1 -0
- package/dist/cli/commands/ports.js +166 -0
- package/dist/cli/commands/ports.js.map +1 -0
- package/dist/cli/commands/pull.js +166 -0
- package/dist/cli/commands/pull.js.map +1 -0
- package/dist/cli/commands/query.js +180 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/restore.js +428 -0
- package/dist/cli/commands/restore.js.map +1 -0
- package/dist/cli/commands/run.js +115 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/self-update.js +99 -0
- package/dist/cli/commands/self-update.js.map +1 -0
- package/dist/cli/commands/sqlite.js +207 -0
- package/dist/cli/commands/sqlite.js.map +1 -0
- package/dist/cli/commands/start.js +196 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/stop.js +182 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/url.js +88 -0
- package/dist/cli/commands/url.js.map +1 -0
- package/dist/cli/commands/users.js +189 -0
- package/dist/cli/commands/users.js.map +1 -0
- package/dist/cli/commands/version.js +52 -0
- package/dist/cli/commands/version.js.map +1 -0
- package/dist/cli/commands/which.js +258 -0
- package/dist/cli/commands/which.js.map +1 -0
- package/dist/cli/constants.js +212 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/helpers.js +1120 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/index.js +146 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/ui/prompts.js +1002 -0
- package/dist/cli/ui/prompts.js.map +1 -0
- package/dist/cli/ui/spinner.js +74 -0
- package/dist/cli/ui/spinner.js.map +1 -0
- package/dist/cli/ui/theme.js +99 -0
- package/dist/cli/ui/theme.js.map +1 -0
- package/dist/cli/utils/file-follower.js +79 -0
- package/dist/cli/utils/file-follower.js.map +1 -0
- package/dist/config/backup-formats.js +363 -0
- package/dist/config/backup-formats.js.map +1 -0
- package/dist/config/defaults.js +25 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/engine-defaults.js +303 -0
- package/dist/config/engine-defaults.js.map +1 -0
- package/dist/config/engines-registry.js +103 -0
- package/dist/config/engines-registry.js.map +1 -0
- package/dist/config/os-dependencies.js +767 -0
- package/dist/config/os-dependencies.js.map +1 -0
- package/dist/config/paths.js +156 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/version.js +3 -0
- package/dist/config/version.js.map +1 -0
- package/dist/core/backup-restore.js +219 -0
- package/dist/core/backup-restore.js.map +1 -0
- package/dist/core/base-binary-manager.js +403 -0
- package/dist/core/base-binary-manager.js.map +1 -0
- package/dist/core/base-document-binary-manager.js +364 -0
- package/dist/core/base-document-binary-manager.js.map +1 -0
- package/dist/core/base-embedded-binary-manager.js +364 -0
- package/dist/core/base-embedded-binary-manager.js.map +1 -0
- package/dist/core/base-server-binary-manager.js +368 -0
- package/dist/core/base-server-binary-manager.js.map +1 -0
- package/dist/core/config-manager.js +495 -0
- package/dist/core/config-manager.js.map +1 -0
- package/dist/core/container-manager.js +609 -0
- package/dist/core/container-manager.js.map +1 -0
- package/dist/core/credential-generator.js +67 -0
- package/dist/core/credential-generator.js.map +1 -0
- package/dist/core/credential-manager.js +211 -0
- package/dist/core/credential-manager.js.map +1 -0
- package/dist/core/dblab-utils.js +105 -0
- package/dist/core/dblab-utils.js.map +1 -0
- package/dist/core/dependency-manager.js +359 -0
- package/dist/core/dependency-manager.js.map +1 -0
- package/dist/core/docker-exporter.js +1077 -0
- package/dist/core/docker-exporter.js.map +1 -0
- package/dist/core/error-handler.js +295 -0
- package/dist/core/error-handler.js.map +1 -0
- package/dist/core/fs-error-utils.js +74 -0
- package/dist/core/fs-error-utils.js.map +1 -0
- package/dist/core/homebrew-version-manager.js +280 -0
- package/dist/core/homebrew-version-manager.js.map +1 -0
- package/dist/core/hostdb-client.js +252 -0
- package/dist/core/hostdb-client.js.map +1 -0
- package/dist/core/hostdb-metadata.js +243 -0
- package/dist/core/hostdb-metadata.js.map +1 -0
- package/dist/core/hostdb-releases-factory.js +161 -0
- package/dist/core/hostdb-releases-factory.js.map +1 -0
- package/dist/core/library-env.js +88 -0
- package/dist/core/library-env.js.map +1 -0
- package/dist/core/pgweb-utils.js +53 -0
- package/dist/core/pgweb-utils.js.map +1 -0
- package/dist/core/platform-service.js +632 -0
- package/dist/core/platform-service.js.map +1 -0
- package/dist/core/port-manager.js +136 -0
- package/dist/core/port-manager.js.map +1 -0
- package/dist/core/process-manager.js +445 -0
- package/dist/core/process-manager.js.map +1 -0
- package/dist/core/pull-manager.js +418 -0
- package/dist/core/pull-manager.js.map +1 -0
- package/dist/core/query-parser.js +449 -0
- package/dist/core/query-parser.js.map +1 -0
- package/dist/core/spawn-utils.js +90 -0
- package/dist/core/spawn-utils.js.map +1 -0
- package/dist/core/start-with-retry.js +90 -0
- package/dist/core/start-with-retry.js.map +1 -0
- package/dist/core/test-cleanup.js +85 -0
- package/dist/core/test-cleanup.js.map +1 -0
- package/dist/core/tls-generator.js +84 -0
- package/dist/core/tls-generator.js.map +1 -0
- package/dist/core/transaction-manager.js +139 -0
- package/dist/core/transaction-manager.js.map +1 -0
- package/dist/core/update-manager.js +241 -0
- package/dist/core/update-manager.js.map +1 -0
- package/dist/core/version-migration.js +260 -0
- package/dist/core/version-migration.js.map +1 -0
- package/dist/core/version-utils.js +91 -0
- package/dist/core/version-utils.js.map +1 -0
- package/dist/engines/base-engine.js +179 -0
- package/dist/engines/base-engine.js.map +1 -0
- package/dist/engines/clickhouse/backup.js +289 -0
- package/dist/engines/clickhouse/backup.js.map +1 -0
- package/dist/engines/clickhouse/binary-manager.js +145 -0
- package/dist/engines/clickhouse/binary-manager.js.map +1 -0
- package/dist/engines/clickhouse/binary-urls.js +100 -0
- package/dist/engines/clickhouse/binary-urls.js.map +1 -0
- package/dist/engines/clickhouse/cli-utils.js +143 -0
- package/dist/engines/clickhouse/cli-utils.js.map +1 -0
- package/dist/engines/clickhouse/hostdb-releases.js +24 -0
- package/dist/engines/clickhouse/hostdb-releases.js.map +1 -0
- package/dist/engines/clickhouse/index.js +1077 -0
- package/dist/engines/clickhouse/index.js.map +1 -0
- package/dist/engines/clickhouse/restore.js +335 -0
- package/dist/engines/clickhouse/restore.js.map +1 -0
- package/dist/engines/clickhouse/version-maps.js +83 -0
- package/dist/engines/clickhouse/version-maps.js.map +1 -0
- package/dist/engines/clickhouse/version-validator.js +133 -0
- package/dist/engines/clickhouse/version-validator.js.map +1 -0
- package/dist/engines/cockroachdb/backup.js +261 -0
- package/dist/engines/cockroachdb/backup.js.map +1 -0
- package/dist/engines/cockroachdb/binary-manager.js +33 -0
- package/dist/engines/cockroachdb/binary-manager.js.map +1 -0
- package/dist/engines/cockroachdb/binary-urls.js +33 -0
- package/dist/engines/cockroachdb/binary-urls.js.map +1 -0
- package/dist/engines/cockroachdb/cli-utils.js +338 -0
- package/dist/engines/cockroachdb/cli-utils.js.map +1 -0
- package/dist/engines/cockroachdb/hostdb-releases.js +21 -0
- package/dist/engines/cockroachdb/hostdb-releases.js.map +1 -0
- package/dist/engines/cockroachdb/index.js +1016 -0
- package/dist/engines/cockroachdb/index.js.map +1 -0
- package/dist/engines/cockroachdb/restore.js +323 -0
- package/dist/engines/cockroachdb/restore.js.map +1 -0
- package/dist/engines/cockroachdb/version-maps.js +37 -0
- package/dist/engines/cockroachdb/version-maps.js.map +1 -0
- package/dist/engines/couchdb/api-client.js +64 -0
- package/dist/engines/couchdb/api-client.js.map +1 -0
- package/dist/engines/couchdb/backup.js +90 -0
- package/dist/engines/couchdb/backup.js.map +1 -0
- package/dist/engines/couchdb/binary-manager.js +62 -0
- package/dist/engines/couchdb/binary-manager.js.map +1 -0
- package/dist/engines/couchdb/binary-urls.js +92 -0
- package/dist/engines/couchdb/binary-urls.js.map +1 -0
- package/dist/engines/couchdb/hostdb-releases.js +21 -0
- package/dist/engines/couchdb/hostdb-releases.js.map +1 -0
- package/dist/engines/couchdb/index.js +1043 -0
- package/dist/engines/couchdb/index.js.map +1 -0
- package/dist/engines/couchdb/restore.js +198 -0
- package/dist/engines/couchdb/restore.js.map +1 -0
- package/dist/engines/couchdb/version-maps.js +67 -0
- package/dist/engines/couchdb/version-maps.js.map +1 -0
- package/dist/engines/couchdb/version-validator.js +88 -0
- package/dist/engines/couchdb/version-validator.js.map +1 -0
- package/dist/engines/duckdb/binary-manager.js +33 -0
- package/dist/engines/duckdb/binary-manager.js.map +1 -0
- package/{engines/duckdb/binary-urls.ts → dist/engines/duckdb/binary-urls.js} +11 -16
- package/dist/engines/duckdb/binary-urls.js.map +1 -0
- package/dist/engines/duckdb/hostdb-releases.js +21 -0
- package/dist/engines/duckdb/hostdb-releases.js.map +1 -0
- package/dist/engines/duckdb/index.js +594 -0
- package/dist/engines/duckdb/index.js.map +1 -0
- package/dist/engines/duckdb/registry.js +265 -0
- package/dist/engines/duckdb/registry.js.map +1 -0
- package/dist/engines/duckdb/scanner.js +12 -0
- package/dist/engines/duckdb/scanner.js.map +1 -0
- package/dist/engines/duckdb/version-maps.js +67 -0
- package/dist/engines/duckdb/version-maps.js.map +1 -0
- package/dist/engines/duckdb/version-validator.js +62 -0
- package/dist/engines/duckdb/version-validator.js.map +1 -0
- package/dist/engines/ferretdb/backup.js +170 -0
- package/dist/engines/ferretdb/backup.js.map +1 -0
- package/dist/engines/ferretdb/binary-manager.js +765 -0
- package/dist/engines/ferretdb/binary-manager.js.map +1 -0
- package/dist/engines/ferretdb/binary-urls.js +135 -0
- package/dist/engines/ferretdb/binary-urls.js.map +1 -0
- package/dist/engines/ferretdb/index.js +1517 -0
- package/dist/engines/ferretdb/index.js.map +1 -0
- package/dist/engines/ferretdb/restore.js +310 -0
- package/dist/engines/ferretdb/restore.js.map +1 -0
- package/{engines/ferretdb/version-maps.ts → dist/engines/ferretdb/version-maps.js} +62 -79
- package/dist/engines/ferretdb/version-maps.js.map +1 -0
- package/dist/engines/file-based-utils.js +184 -0
- package/dist/engines/file-based-utils.js.map +1 -0
- package/dist/engines/index.js +124 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/influxdb/api-client.js +54 -0
- package/dist/engines/influxdb/api-client.js.map +1 -0
- package/dist/engines/influxdb/backup.js +119 -0
- package/dist/engines/influxdb/backup.js.map +1 -0
- package/dist/engines/influxdb/binary-manager.js +87 -0
- package/dist/engines/influxdb/binary-manager.js.map +1 -0
- package/dist/engines/influxdb/binary-urls.js +56 -0
- package/dist/engines/influxdb/binary-urls.js.map +1 -0
- package/dist/engines/influxdb/hostdb-releases.js +21 -0
- package/dist/engines/influxdb/hostdb-releases.js.map +1 -0
- package/dist/engines/influxdb/index.js +962 -0
- package/dist/engines/influxdb/index.js.map +1 -0
- package/dist/engines/influxdb/restore.js +329 -0
- package/dist/engines/influxdb/restore.js.map +1 -0
- package/dist/engines/influxdb/version-maps.js +64 -0
- package/dist/engines/influxdb/version-maps.js.map +1 -0
- package/dist/engines/influxdb/version-validator.js +109 -0
- package/dist/engines/influxdb/version-validator.js.map +1 -0
- package/dist/engines/mariadb/backup.js +178 -0
- package/dist/engines/mariadb/backup.js.map +1 -0
- package/dist/engines/mariadb/binary-manager.js +33 -0
- package/dist/engines/mariadb/binary-manager.js.map +1 -0
- package/{engines/mariadb/binary-urls.ts → dist/engines/mariadb/binary-urls.js} +38 -55
- package/dist/engines/mariadb/binary-urls.js.map +1 -0
- package/dist/engines/mariadb/hostdb-releases.js +21 -0
- package/dist/engines/mariadb/hostdb-releases.js.map +1 -0
- package/dist/engines/mariadb/index.js +1011 -0
- package/dist/engines/mariadb/index.js.map +1 -0
- package/dist/engines/mariadb/restore.js +322 -0
- package/dist/engines/mariadb/restore.js.map +1 -0
- package/dist/engines/mariadb/version-maps.js +63 -0
- package/dist/engines/mariadb/version-maps.js.map +1 -0
- package/dist/engines/mariadb/version-validator.js +143 -0
- package/dist/engines/mariadb/version-validator.js.map +1 -0
- package/dist/engines/meilisearch/api-client.js +50 -0
- package/dist/engines/meilisearch/api-client.js.map +1 -0
- package/dist/engines/meilisearch/backup.js +167 -0
- package/dist/engines/meilisearch/backup.js.map +1 -0
- package/dist/engines/meilisearch/binary-manager.js +31 -0
- package/dist/engines/meilisearch/binary-manager.js.map +1 -0
- package/dist/engines/meilisearch/binary-urls.js +56 -0
- package/dist/engines/meilisearch/binary-urls.js.map +1 -0
- package/dist/engines/meilisearch/hostdb-releases.js +21 -0
- package/dist/engines/meilisearch/hostdb-releases.js.map +1 -0
- package/dist/engines/meilisearch/index.js +992 -0
- package/dist/engines/meilisearch/index.js.map +1 -0
- package/dist/engines/meilisearch/restore.js +167 -0
- package/dist/engines/meilisearch/restore.js.map +1 -0
- package/dist/engines/meilisearch/version-maps.js +67 -0
- package/dist/engines/meilisearch/version-maps.js.map +1 -0
- package/dist/engines/meilisearch/version-validator.js +109 -0
- package/dist/engines/meilisearch/version-validator.js.map +1 -0
- package/dist/engines/mongodb/backup.js +109 -0
- package/dist/engines/mongodb/backup.js.map +1 -0
- package/dist/engines/mongodb/binary-manager.js +36 -0
- package/dist/engines/mongodb/binary-manager.js.map +1 -0
- package/dist/engines/mongodb/binary-urls.js +46 -0
- package/dist/engines/mongodb/binary-urls.js.map +1 -0
- package/dist/engines/mongodb/cli-utils.js +131 -0
- package/dist/engines/mongodb/cli-utils.js.map +1 -0
- package/dist/engines/mongodb/hostdb-releases.js +77 -0
- package/dist/engines/mongodb/hostdb-releases.js.map +1 -0
- package/dist/engines/mongodb/index.js +873 -0
- package/dist/engines/mongodb/index.js.map +1 -0
- package/dist/engines/mongodb/restore.js +276 -0
- package/dist/engines/mongodb/restore.js.map +1 -0
- package/dist/engines/mongodb/version-maps.js +79 -0
- package/dist/engines/mongodb/version-maps.js.map +1 -0
- package/dist/engines/mongodb/version-validator.js +133 -0
- package/dist/engines/mongodb/version-validator.js.map +1 -0
- package/dist/engines/mysql/backup.js +210 -0
- package/dist/engines/mysql/backup.js.map +1 -0
- package/dist/engines/mysql/binary-detection.js +325 -0
- package/dist/engines/mysql/binary-detection.js.map +1 -0
- package/dist/engines/mysql/binary-manager.js +30 -0
- package/dist/engines/mysql/binary-manager.js.map +1 -0
- package/dist/engines/mysql/binary-urls.js +87 -0
- package/dist/engines/mysql/binary-urls.js.map +1 -0
- package/{engines/mysql/hostdb-releases.ts → dist/engines/mysql/hostdb-releases.js} +20 -23
- package/dist/engines/mysql/hostdb-releases.js.map +1 -0
- package/dist/engines/mysql/index.js +1066 -0
- package/dist/engines/mysql/index.js.map +1 -0
- package/dist/engines/mysql/restore.js +361 -0
- package/dist/engines/mysql/restore.js.map +1 -0
- package/dist/engines/mysql/version-maps.js +79 -0
- package/dist/engines/mysql/version-maps.js.map +1 -0
- package/dist/engines/mysql/version-validator.js +266 -0
- package/dist/engines/mysql/version-validator.js.map +1 -0
- package/dist/engines/postgresql/backup.js +118 -0
- package/dist/engines/postgresql/backup.js.map +1 -0
- package/dist/engines/postgresql/binary-manager.js +85 -0
- package/dist/engines/postgresql/binary-manager.js.map +1 -0
- package/dist/engines/postgresql/binary-urls.js +80 -0
- package/dist/engines/postgresql/binary-urls.js.map +1 -0
- package/dist/engines/postgresql/hostdb-releases.js +21 -0
- package/dist/engines/postgresql/hostdb-releases.js.map +1 -0
- package/dist/engines/postgresql/index.js +852 -0
- package/dist/engines/postgresql/index.js.map +1 -0
- package/dist/engines/postgresql/remote-version.js +109 -0
- package/dist/engines/postgresql/remote-version.js.map +1 -0
- package/dist/engines/postgresql/restore.js +254 -0
- package/dist/engines/postgresql/restore.js.map +1 -0
- package/dist/engines/postgresql/version-maps.js +73 -0
- package/dist/engines/postgresql/version-maps.js.map +1 -0
- package/dist/engines/postgresql/version-validator.js +286 -0
- package/dist/engines/postgresql/version-validator.js.map +1 -0
- package/dist/engines/qdrant/api-client.js +50 -0
- package/dist/engines/qdrant/api-client.js.map +1 -0
- package/dist/engines/qdrant/backup.js +115 -0
- package/dist/engines/qdrant/backup.js.map +1 -0
- package/dist/engines/qdrant/binary-manager.js +31 -0
- package/dist/engines/qdrant/binary-manager.js.map +1 -0
- package/dist/engines/qdrant/binary-urls.js +92 -0
- package/dist/engines/qdrant/binary-urls.js.map +1 -0
- package/dist/engines/qdrant/cli-utils.js +39 -0
- package/dist/engines/qdrant/cli-utils.js.map +1 -0
- package/dist/engines/qdrant/hostdb-releases.js +21 -0
- package/dist/engines/qdrant/hostdb-releases.js.map +1 -0
- package/dist/engines/qdrant/index.js +1002 -0
- package/dist/engines/qdrant/index.js.map +1 -0
- package/dist/engines/qdrant/restore.js +154 -0
- package/dist/engines/qdrant/restore.js.map +1 -0
- package/dist/engines/qdrant/version-maps.js +67 -0
- package/dist/engines/qdrant/version-maps.js.map +1 -0
- package/dist/engines/qdrant/version-validator.js +109 -0
- package/dist/engines/qdrant/version-validator.js.map +1 -0
- package/dist/engines/questdb/backup.js +191 -0
- package/dist/engines/questdb/backup.js.map +1 -0
- package/dist/engines/questdb/binary-manager.js +247 -0
- package/dist/engines/questdb/binary-manager.js.map +1 -0
- package/dist/engines/questdb/binary-urls.js +27 -0
- package/dist/engines/questdb/binary-urls.js.map +1 -0
- package/dist/engines/questdb/hostdb-releases.js +21 -0
- package/dist/engines/questdb/hostdb-releases.js.map +1 -0
- package/dist/engines/questdb/index.js +814 -0
- package/dist/engines/questdb/index.js.map +1 -0
- package/dist/engines/questdb/restore.js +202 -0
- package/dist/engines/questdb/restore.js.map +1 -0
- package/dist/engines/questdb/version-maps.js +33 -0
- package/dist/engines/questdb/version-maps.js.map +1 -0
- package/dist/engines/questdb/version-validator.js +99 -0
- package/dist/engines/questdb/version-validator.js.map +1 -0
- package/dist/engines/redis/backup.js +292 -0
- package/dist/engines/redis/backup.js.map +1 -0
- package/dist/engines/redis/binary-manager.js +32 -0
- package/dist/engines/redis/binary-manager.js.map +1 -0
- package/dist/engines/redis/binary-urls.js +96 -0
- package/dist/engines/redis/binary-urls.js.map +1 -0
- package/dist/engines/redis/cli-utils.js +38 -0
- package/dist/engines/redis/cli-utils.js.map +1 -0
- package/dist/engines/redis/hostdb-releases.js +21 -0
- package/dist/engines/redis/hostdb-releases.js.map +1 -0
- package/dist/engines/redis/index.js +1263 -0
- package/dist/engines/redis/index.js.map +1 -0
- package/dist/engines/redis/restore.js +338 -0
- package/dist/engines/redis/restore.js.map +1 -0
- package/dist/engines/redis/version-maps.js +70 -0
- package/dist/engines/redis/version-maps.js.map +1 -0
- package/dist/engines/redis/version-validator.js +109 -0
- package/dist/engines/redis/version-validator.js.map +1 -0
- package/dist/engines/sqlite/binary-manager.js +39 -0
- package/dist/engines/sqlite/binary-manager.js.map +1 -0
- package/{engines/sqlite/binary-urls.ts → dist/engines/sqlite/binary-urls.js} +11 -16
- package/dist/engines/sqlite/binary-urls.js.map +1 -0
- package/dist/engines/sqlite/hostdb-releases.js +21 -0
- package/dist/engines/sqlite/hostdb-releases.js.map +1 -0
- package/dist/engines/sqlite/index.js +493 -0
- package/dist/engines/sqlite/index.js.map +1 -0
- package/dist/engines/sqlite/registry.js +163 -0
- package/dist/engines/sqlite/registry.js.map +1 -0
- package/dist/engines/sqlite/scanner.js +12 -0
- package/dist/engines/sqlite/scanner.js.map +1 -0
- package/dist/engines/sqlite/version-maps.js +57 -0
- package/dist/engines/sqlite/version-maps.js.map +1 -0
- package/dist/engines/surrealdb/backup.js +97 -0
- package/dist/engines/surrealdb/backup.js.map +1 -0
- package/dist/engines/surrealdb/binary-manager.js +33 -0
- package/dist/engines/surrealdb/binary-manager.js.map +1 -0
- package/dist/engines/surrealdb/binary-urls.js +33 -0
- package/dist/engines/surrealdb/binary-urls.js.map +1 -0
- package/dist/engines/surrealdb/cli-utils.js +147 -0
- package/dist/engines/surrealdb/cli-utils.js.map +1 -0
- package/dist/engines/surrealdb/hostdb-releases.js +21 -0
- package/dist/engines/surrealdb/hostdb-releases.js.map +1 -0
- package/dist/engines/surrealdb/index.js +1022 -0
- package/dist/engines/surrealdb/index.js.map +1 -0
- package/dist/engines/surrealdb/restore.js +224 -0
- package/dist/engines/surrealdb/restore.js.map +1 -0
- package/dist/engines/surrealdb/version-maps.js +36 -0
- package/dist/engines/surrealdb/version-maps.js.map +1 -0
- package/dist/engines/tigerbeetle/backup.js +36 -0
- package/dist/engines/tigerbeetle/backup.js.map +1 -0
- package/dist/engines/tigerbeetle/binary-manager.js +72 -0
- package/dist/engines/tigerbeetle/binary-manager.js.map +1 -0
- package/dist/engines/tigerbeetle/binary-urls.js +49 -0
- package/dist/engines/tigerbeetle/binary-urls.js.map +1 -0
- package/dist/engines/tigerbeetle/hostdb-releases.js +21 -0
- package/dist/engines/tigerbeetle/hostdb-releases.js.map +1 -0
- package/dist/engines/tigerbeetle/index.js +559 -0
- package/dist/engines/tigerbeetle/index.js.map +1 -0
- package/dist/engines/tigerbeetle/restore.js +91 -0
- package/dist/engines/tigerbeetle/restore.js.map +1 -0
- package/{engines/tigerbeetle/version-maps.ts → dist/engines/tigerbeetle/version-maps.js} +22 -31
- package/dist/engines/tigerbeetle/version-maps.js.map +1 -0
- package/dist/engines/tigerbeetle/version-validator.js +108 -0
- package/dist/engines/tigerbeetle/version-validator.js.map +1 -0
- package/dist/engines/typedb/backup.js +129 -0
- package/dist/engines/typedb/backup.js.map +1 -0
- package/dist/engines/typedb/binary-manager.js +151 -0
- package/dist/engines/typedb/binary-manager.js.map +1 -0
- package/dist/engines/typedb/binary-urls.js +33 -0
- package/dist/engines/typedb/binary-urls.js.map +1 -0
- package/dist/engines/typedb/cli-utils.js +163 -0
- package/dist/engines/typedb/cli-utils.js.map +1 -0
- package/dist/engines/typedb/hostdb-releases.js +21 -0
- package/dist/engines/typedb/hostdb-releases.js.map +1 -0
- package/dist/engines/typedb/index.js +1003 -0
- package/dist/engines/typedb/index.js.map +1 -0
- package/dist/engines/typedb/restore.js +279 -0
- package/dist/engines/typedb/restore.js.map +1 -0
- package/dist/engines/typedb/version-maps.js +40 -0
- package/dist/engines/typedb/version-maps.js.map +1 -0
- package/dist/engines/typedb/version-validator.js +103 -0
- package/dist/engines/typedb/version-validator.js.map +1 -0
- package/dist/engines/valkey/backup.js +292 -0
- package/dist/engines/valkey/backup.js.map +1 -0
- package/dist/engines/valkey/binary-manager.js +33 -0
- package/dist/engines/valkey/binary-manager.js.map +1 -0
- package/dist/engines/valkey/binary-urls.js +98 -0
- package/dist/engines/valkey/binary-urls.js.map +1 -0
- package/dist/engines/valkey/cli-utils.js +38 -0
- package/dist/engines/valkey/cli-utils.js.map +1 -0
- package/dist/engines/valkey/hostdb-releases.js +21 -0
- package/dist/engines/valkey/hostdb-releases.js.map +1 -0
- package/dist/engines/valkey/index.js +1257 -0
- package/dist/engines/valkey/index.js.map +1 -0
- package/dist/engines/valkey/restore.js +340 -0
- package/dist/engines/valkey/restore.js.map +1 -0
- package/dist/engines/valkey/version-maps.js +70 -0
- package/dist/engines/valkey/version-maps.js.map +1 -0
- package/dist/engines/valkey/version-validator.js +112 -0
- package/dist/engines/valkey/version-validator.js.map +1 -0
- package/dist/engines/weaviate/api-client.js +50 -0
- package/dist/engines/weaviate/api-client.js.map +1 -0
- package/dist/engines/weaviate/backup.js +95 -0
- package/dist/engines/weaviate/backup.js.map +1 -0
- package/dist/engines/weaviate/binary-manager.js +58 -0
- package/dist/engines/weaviate/binary-manager.js.map +1 -0
- package/dist/engines/weaviate/binary-urls.js +92 -0
- package/dist/engines/weaviate/binary-urls.js.map +1 -0
- package/dist/engines/weaviate/cli-utils.js +39 -0
- package/dist/engines/weaviate/cli-utils.js.map +1 -0
- package/dist/engines/weaviate/hostdb-releases.js +21 -0
- package/dist/engines/weaviate/hostdb-releases.js.map +1 -0
- package/dist/engines/weaviate/index.js +871 -0
- package/dist/engines/weaviate/index.js.map +1 -0
- package/dist/engines/weaviate/restore.js +185 -0
- package/dist/engines/weaviate/restore.js.map +1 -0
- package/dist/engines/weaviate/version-maps.js +67 -0
- package/dist/engines/weaviate/version-maps.js.map +1 -0
- package/dist/engines/weaviate/version-validator.js +109 -0
- package/dist/engines/weaviate/version-validator.js.map +1 -0
- package/dist/types/index.js +102 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +12 -9
- package/bin/cli.js +0 -68
- package/cli/bin.ts +0 -10
- package/cli/commands/attach.ts +0 -139
- package/cli/commands/backup.ts +0 -290
- package/cli/commands/backups.ts +0 -247
- package/cli/commands/clone.ts +0 -159
- package/cli/commands/config.ts +0 -367
- package/cli/commands/connect.ts +0 -684
- package/cli/commands/create.ts +0 -1201
- package/cli/commands/databases.ts +0 -630
- package/cli/commands/delete.ts +0 -133
- package/cli/commands/deps.ts +0 -342
- package/cli/commands/detach.ts +0 -107
- package/cli/commands/doctor.ts +0 -689
- package/cli/commands/duckdb.ts +0 -273
- package/cli/commands/edit.ts +0 -683
- package/cli/commands/engines.ts +0 -1914
- package/cli/commands/export.ts +0 -544
- package/cli/commands/info.ts +0 -340
- package/cli/commands/list.ts +0 -284
- package/cli/commands/logs.ts +0 -102
- package/cli/commands/menu/backup-handlers.ts +0 -1571
- package/cli/commands/menu/container-handlers.ts +0 -2288
- package/cli/commands/menu/engine-handlers.ts +0 -355
- package/cli/commands/menu/index.ts +0 -342
- package/cli/commands/menu/settings-handlers.ts +0 -365
- package/cli/commands/menu/shared.ts +0 -23
- package/cli/commands/menu/shell-handlers.ts +0 -1811
- package/cli/commands/menu/sql-handlers.ts +0 -231
- package/cli/commands/menu/update-handlers.ts +0 -378
- package/cli/commands/menu/validators.ts +0 -8
- package/cli/commands/ports.ts +0 -211
- package/cli/commands/pull.ts +0 -223
- package/cli/commands/query.ts +0 -241
- package/cli/commands/restore.ts +0 -587
- package/cli/commands/run.ts +0 -178
- package/cli/commands/self-update.ts +0 -121
- package/cli/commands/sqlite.ts +0 -273
- package/cli/commands/start.ts +0 -218
- package/cli/commands/stop.ts +0 -241
- package/cli/commands/url.ts +0 -104
- package/cli/commands/users.ts +0 -264
- package/cli/commands/version.ts +0 -55
- package/cli/commands/which.ts +0 -290
- package/cli/constants.ts +0 -233
- package/cli/helpers.ts +0 -1593
- package/cli/index.ts +0 -162
- package/cli/ui/prompts.ts +0 -1525
- package/cli/ui/spinner.ts +0 -88
- package/cli/ui/theme.ts +0 -128
- package/cli/utils/file-follower.ts +0 -93
- package/config/backup-formats.ts +0 -446
- package/config/defaults.ts +0 -56
- package/config/engine-defaults.ts +0 -336
- package/config/engines-registry.ts +0 -150
- package/config/engines.schema.json +0 -135
- package/config/os-dependencies.ts +0 -888
- package/config/paths.ts +0 -200
- package/core/backup-restore.ts +0 -330
- package/core/base-binary-manager.ts +0 -562
- package/core/base-document-binary-manager.ts +0 -523
- package/core/base-embedded-binary-manager.ts +0 -547
- package/core/base-server-binary-manager.ts +0 -523
- package/core/config-manager.ts +0 -652
- package/core/container-manager.ts +0 -787
- package/core/credential-generator.ts +0 -93
- package/core/credential-manager.ts +0 -259
- package/core/dblab-utils.ts +0 -113
- package/core/dependency-manager.ts +0 -512
- package/core/docker-exporter.ts +0 -1345
- package/core/error-handler.ts +0 -419
- package/core/fs-error-utils.ts +0 -82
- package/core/homebrew-version-manager.ts +0 -352
- package/core/hostdb-client.ts +0 -344
- package/core/hostdb-metadata.ts +0 -350
- package/core/hostdb-releases-factory.ts +0 -237
- package/core/library-env.ts +0 -118
- package/core/pgweb-utils.ts +0 -62
- package/core/platform-service.ts +0 -829
- package/core/port-manager.ts +0 -165
- package/core/process-manager.ts +0 -576
- package/core/pull-manager.ts +0 -511
- package/core/query-parser.ts +0 -514
- package/core/spawn-utils.ts +0 -122
- package/core/start-with-retry.ts +0 -130
- package/core/test-cleanup.ts +0 -108
- package/core/tls-generator.ts +0 -116
- package/core/transaction-manager.ts +0 -158
- package/core/update-manager.ts +0 -308
- package/core/version-migration.ts +0 -346
- package/core/version-utils.ts +0 -104
- package/engines/base-engine.ts +0 -340
- package/engines/clickhouse/README.md +0 -231
- package/engines/clickhouse/backup.ts +0 -398
- package/engines/clickhouse/binary-manager.ts +0 -201
- package/engines/clickhouse/binary-urls.ts +0 -125
- package/engines/clickhouse/cli-utils.ts +0 -176
- package/engines/clickhouse/hostdb-releases.ts +0 -30
- package/engines/clickhouse/index.ts +0 -1345
- package/engines/clickhouse/restore.ts +0 -466
- package/engines/clickhouse/version-maps.ts +0 -95
- package/engines/clickhouse/version-validator.ts +0 -154
- package/engines/cockroachdb/README.md +0 -170
- package/engines/cockroachdb/backup.ts +0 -376
- package/engines/cockroachdb/binary-manager.ts +0 -45
- package/engines/cockroachdb/binary-urls.ts +0 -40
- package/engines/cockroachdb/cli-utils.ts +0 -384
- package/engines/cockroachdb/hostdb-releases.ts +0 -26
- package/engines/cockroachdb/index.ts +0 -1276
- package/engines/cockroachdb/restore.ts +0 -455
- package/engines/cockroachdb/version-maps.ts +0 -42
- package/engines/couchdb/README.md +0 -257
- package/engines/couchdb/api-client.ts +0 -81
- package/engines/couchdb/backup.ts +0 -137
- package/engines/couchdb/binary-manager.ts +0 -86
- package/engines/couchdb/binary-urls.ts +0 -115
- package/engines/couchdb/hostdb-releases.ts +0 -23
- package/engines/couchdb/index.ts +0 -1429
- package/engines/couchdb/restore.ts +0 -290
- package/engines/couchdb/version-maps.ts +0 -78
- package/engines/couchdb/version-validator.ts +0 -111
- package/engines/duckdb/README.md +0 -154
- package/engines/duckdb/binary-manager.ts +0 -45
- package/engines/duckdb/hostdb-releases.ts +0 -23
- package/engines/duckdb/index.ts +0 -749
- package/engines/duckdb/registry.ts +0 -303
- package/engines/duckdb/scanner.ts +0 -22
- package/engines/duckdb/version-maps.ts +0 -78
- package/engines/duckdb/version-validator.ts +0 -78
- package/engines/ferretdb/README.md +0 -262
- package/engines/ferretdb/backup.ts +0 -173
- package/engines/ferretdb/binary-manager.ts +0 -1095
- package/engines/ferretdb/binary-urls.ts +0 -183
- package/engines/ferretdb/index.ts +0 -1907
- package/engines/ferretdb/restore.ts +0 -357
- package/engines/file-based-utils.ts +0 -262
- package/engines/index.ts +0 -131
- package/engines/influxdb/README.md +0 -180
- package/engines/influxdb/api-client.ts +0 -64
- package/engines/influxdb/backup.ts +0 -160
- package/engines/influxdb/binary-manager.ts +0 -110
- package/engines/influxdb/binary-urls.ts +0 -69
- package/engines/influxdb/hostdb-releases.ts +0 -23
- package/engines/influxdb/index.ts +0 -1272
- package/engines/influxdb/restore.ts +0 -417
- package/engines/influxdb/version-maps.ts +0 -75
- package/engines/influxdb/version-validator.ts +0 -128
- package/engines/mariadb/README.md +0 -141
- package/engines/mariadb/backup.ts +0 -233
- package/engines/mariadb/binary-manager.ts +0 -45
- package/engines/mariadb/hostdb-releases.ts +0 -23
- package/engines/mariadb/index.ts +0 -1300
- package/engines/mariadb/restore.ts +0 -447
- package/engines/mariadb/version-maps.ts +0 -72
- package/engines/mariadb/version-validator.ts +0 -181
- package/engines/meilisearch/README.md +0 -255
- package/engines/meilisearch/api-client.ts +0 -61
- package/engines/meilisearch/backup.ts +0 -233
- package/engines/meilisearch/binary-manager.ts +0 -43
- package/engines/meilisearch/binary-urls.ts +0 -69
- package/engines/meilisearch/hostdb-releases.ts +0 -26
- package/engines/meilisearch/index.ts +0 -1292
- package/engines/meilisearch/restore.ts +0 -219
- package/engines/meilisearch/version-maps.ts +0 -78
- package/engines/meilisearch/version-validator.ts +0 -128
- package/engines/mongodb/README.md +0 -162
- package/engines/mongodb/backup.ts +0 -127
- package/engines/mongodb/binary-manager.ts +0 -48
- package/engines/mongodb/binary-urls.ts +0 -63
- package/engines/mongodb/cli-utils.ts +0 -171
- package/engines/mongodb/hostdb-releases.ts +0 -91
- package/engines/mongodb/index.ts +0 -1118
- package/engines/mongodb/restore.ts +0 -361
- package/engines/mongodb/version-maps.ts +0 -91
- package/engines/mongodb/version-validator.ts +0 -160
- package/engines/mysql/README.md +0 -142
- package/engines/mysql/backup.ts +0 -270
- package/engines/mysql/binary-detection.ts +0 -408
- package/engines/mysql/binary-manager.ts +0 -42
- package/engines/mysql/binary-urls.ts +0 -104
- package/engines/mysql/index.ts +0 -1361
- package/engines/mysql/restore.ts +0 -500
- package/engines/mysql/version-maps.ts +0 -91
- package/engines/mysql/version-validator.ts +0 -369
- package/engines/postgresql/README.md +0 -158
- package/engines/postgresql/backup.ts +0 -151
- package/engines/postgresql/binary-manager.ts +0 -114
- package/engines/postgresql/binary-urls.ts +0 -99
- package/engines/postgresql/hostdb-releases.ts +0 -26
- package/engines/postgresql/index.ts +0 -1143
- package/engines/postgresql/remote-version.ts +0 -161
- package/engines/postgresql/restore.ts +0 -342
- package/engines/postgresql/version-maps.ts +0 -83
- package/engines/postgresql/version-validator.ts +0 -413
- package/engines/qdrant/README.md +0 -222
- package/engines/qdrant/api-client.ts +0 -61
- package/engines/qdrant/backup.ts +0 -165
- package/engines/qdrant/binary-manager.ts +0 -43
- package/engines/qdrant/binary-urls.ts +0 -115
- package/engines/qdrant/cli-utils.ts +0 -43
- package/engines/qdrant/hostdb-releases.ts +0 -23
- package/engines/qdrant/index.ts +0 -1312
- package/engines/qdrant/restore.ts +0 -203
- package/engines/qdrant/version-maps.ts +0 -78
- package/engines/qdrant/version-validator.ts +0 -128
- package/engines/questdb/README.md +0 -334
- package/engines/questdb/backup.ts +0 -220
- package/engines/questdb/binary-manager.ts +0 -310
- package/engines/questdb/binary-urls.ts +0 -34
- package/engines/questdb/hostdb-releases.ts +0 -23
- package/engines/questdb/index.ts +0 -1023
- package/engines/questdb/restore.ts +0 -260
- package/engines/questdb/version-maps.ts +0 -37
- package/engines/questdb/version-validator.ts +0 -121
- package/engines/redis/README.md +0 -173
- package/engines/redis/backup.ts +0 -389
- package/engines/redis/binary-manager.ts +0 -44
- package/engines/redis/binary-urls.ts +0 -117
- package/engines/redis/cli-utils.ts +0 -42
- package/engines/redis/hostdb-releases.ts +0 -23
- package/engines/redis/index.ts +0 -1583
- package/engines/redis/restore.ts +0 -443
- package/engines/redis/version-maps.ts +0 -81
- package/engines/redis/version-validator.ts +0 -131
- package/engines/sqlite/README.md +0 -162
- package/engines/sqlite/binary-manager.ts +0 -52
- package/engines/sqlite/hostdb-releases.ts +0 -23
- package/engines/sqlite/index.ts +0 -641
- package/engines/sqlite/registry.ts +0 -198
- package/engines/sqlite/scanner.ts +0 -22
- package/engines/sqlite/version-maps.ts +0 -64
- package/engines/surrealdb/README.md +0 -218
- package/engines/surrealdb/backup.ts +0 -131
- package/engines/surrealdb/binary-manager.ts +0 -45
- package/engines/surrealdb/binary-urls.ts +0 -40
- package/engines/surrealdb/cli-utils.ts +0 -173
- package/engines/surrealdb/hostdb-releases.ts +0 -23
- package/engines/surrealdb/index.ts +0 -1246
- package/engines/surrealdb/restore.ts +0 -302
- package/engines/surrealdb/version-maps.ts +0 -41
- package/engines/tigerbeetle/README.md +0 -61
- package/engines/tigerbeetle/backup.ts +0 -49
- package/engines/tigerbeetle/binary-manager.ts +0 -95
- package/engines/tigerbeetle/binary-urls.ts +0 -62
- package/engines/tigerbeetle/hostdb-releases.ts +0 -26
- package/engines/tigerbeetle/index.ts +0 -746
- package/engines/tigerbeetle/restore.ts +0 -130
- package/engines/tigerbeetle/version-validator.ts +0 -126
- package/engines/typedb/backup.ts +0 -167
- package/engines/typedb/binary-manager.ts +0 -200
- package/engines/typedb/binary-urls.ts +0 -40
- package/engines/typedb/cli-utils.ts +0 -210
- package/engines/typedb/hostdb-releases.ts +0 -23
- package/engines/typedb/index.ts +0 -1275
- package/engines/typedb/restore.ts +0 -377
- package/engines/typedb/version-maps.ts +0 -48
- package/engines/typedb/version-validator.ts +0 -127
- package/engines/valkey/README.md +0 -219
- package/engines/valkey/backup.ts +0 -389
- package/engines/valkey/binary-manager.ts +0 -45
- package/engines/valkey/binary-urls.ts +0 -122
- package/engines/valkey/cli-utils.ts +0 -42
- package/engines/valkey/hostdb-releases.ts +0 -23
- package/engines/valkey/index.ts +0 -1585
- package/engines/valkey/restore.ts +0 -446
- package/engines/valkey/version-maps.ts +0 -81
- package/engines/valkey/version-validator.ts +0 -131
- package/engines/weaviate/README.md +0 -302
- package/engines/weaviate/api-client.ts +0 -61
- package/engines/weaviate/backup.ts +0 -145
- package/engines/weaviate/binary-manager.ts +0 -80
- package/engines/weaviate/binary-urls.ts +0 -115
- package/engines/weaviate/cli-utils.ts +0 -43
- package/engines/weaviate/hostdb-releases.ts +0 -23
- package/engines/weaviate/index.ts +0 -1139
- package/engines/weaviate/restore.ts +0 -235
- package/engines/weaviate/version-maps.ts +0 -78
- package/engines/weaviate/version-validator.ts +0 -128
- package/types/index.ts +0 -624
- /package/{config → dist/config}/engines.json +0 -0
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PostgreSQL Version Validator
|
|
3
|
-
*
|
|
4
|
-
* Validates compatibility between pg_restore tool version and dump file version.
|
|
5
|
-
* PostgreSQL is backwards compatible - we only fail when dump_version > tool_version.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { exec } from 'child_process'
|
|
9
|
-
import { promisify } from 'util'
|
|
10
|
-
import { createReadStream } from 'fs'
|
|
11
|
-
import { createInterface } from 'readline'
|
|
12
|
-
import {
|
|
13
|
-
SpinDBError,
|
|
14
|
-
ErrorCodes,
|
|
15
|
-
logWarning,
|
|
16
|
-
logDebug,
|
|
17
|
-
} from '../../core/error-handler'
|
|
18
|
-
import { detectPackageManager } from '../../core/dependency-manager'
|
|
19
|
-
import {
|
|
20
|
-
detectInstalledPostgres,
|
|
21
|
-
getDirectBinaryPath,
|
|
22
|
-
findCompatibleVersion,
|
|
23
|
-
} from '../../core/homebrew-version-manager'
|
|
24
|
-
import {
|
|
25
|
-
detectRemotePostgresVersion,
|
|
26
|
-
type RemoteVersionResult,
|
|
27
|
-
} from './remote-version'
|
|
28
|
-
|
|
29
|
-
const execAsync = promisify(exec)
|
|
30
|
-
|
|
31
|
-
// =============================================================================
|
|
32
|
-
// Types
|
|
33
|
-
// =============================================================================
|
|
34
|
-
|
|
35
|
-
export type VersionInfo = {
|
|
36
|
-
major: number
|
|
37
|
-
minor: number
|
|
38
|
-
patch: number
|
|
39
|
-
full: string
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type CompatibilityResult = {
|
|
43
|
-
compatible: boolean
|
|
44
|
-
dumpVersion: VersionInfo | null
|
|
45
|
-
toolVersion: VersionInfo
|
|
46
|
-
warning?: string
|
|
47
|
-
error?: string
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// =============================================================================
|
|
51
|
-
// Version Parsing
|
|
52
|
-
// =============================================================================
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Parse version from pg_dump/pg_restore --version output
|
|
56
|
-
* Examples:
|
|
57
|
-
* "pg_restore (PostgreSQL) 16.1"
|
|
58
|
-
* "pg_restore (PostgreSQL) 14.9 (Homebrew)"
|
|
59
|
-
* "pg_dump (PostgreSQL) 17.0"
|
|
60
|
-
*/
|
|
61
|
-
export function parseToolVersion(output: string): VersionInfo {
|
|
62
|
-
const match = output.match(/(\d+)\.(\d+)(?:\.(\d+))?/)
|
|
63
|
-
if (!match) {
|
|
64
|
-
throw new Error(`Cannot parse version from: ${output}`)
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
major: parseInt(match[1], 10),
|
|
68
|
-
minor: parseInt(match[2], 10),
|
|
69
|
-
patch: parseInt(match[3] || '0', 10),
|
|
70
|
-
full: match[0],
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async function readFirstLines(
|
|
75
|
-
filePath: string,
|
|
76
|
-
lineCount: number,
|
|
77
|
-
): Promise<string> {
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
const lines: string[] = []
|
|
80
|
-
const stream = createReadStream(filePath, { encoding: 'utf8' })
|
|
81
|
-
const rl = createInterface({ input: stream })
|
|
82
|
-
|
|
83
|
-
rl.on('line', (line) => {
|
|
84
|
-
lines.push(line)
|
|
85
|
-
if (lines.length >= lineCount) {
|
|
86
|
-
rl.close()
|
|
87
|
-
stream.destroy()
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
rl.on('close', () => {
|
|
92
|
-
resolve(lines.join('\n'))
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
rl.on('error', reject)
|
|
96
|
-
stream.on('error', reject)
|
|
97
|
-
})
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Parse version from dump file header
|
|
102
|
-
*
|
|
103
|
-
* Plain SQL format: "-- Dumped from database version 16.1"
|
|
104
|
-
* Archive format: Uses `pg_restore -l` to read TOC header
|
|
105
|
-
*/
|
|
106
|
-
export async function parseDumpVersion(
|
|
107
|
-
dumpPath: string,
|
|
108
|
-
format: string,
|
|
109
|
-
pgRestorePath?: string,
|
|
110
|
-
): Promise<VersionInfo | null> {
|
|
111
|
-
try {
|
|
112
|
-
if (format === 'custom' || format === 'directory') {
|
|
113
|
-
// Use pg_restore -l to get archive info
|
|
114
|
-
const restorePath = pgRestorePath || 'pg_restore'
|
|
115
|
-
const { stdout } = await execAsync(
|
|
116
|
-
`"${restorePath}" -l "${dumpPath}" 2>&1 | head -20`,
|
|
117
|
-
)
|
|
118
|
-
// Look for: "; Dumped from database version 16.1"
|
|
119
|
-
const match = stdout.match(
|
|
120
|
-
/Dumped from database version (\d+)\.(\d+)(?:\.(\d+))?/,
|
|
121
|
-
)
|
|
122
|
-
if (match) {
|
|
123
|
-
return {
|
|
124
|
-
major: parseInt(match[1], 10),
|
|
125
|
-
minor: parseInt(match[2], 10),
|
|
126
|
-
patch: parseInt(match[3] || '0', 10),
|
|
127
|
-
full: `${match[1]}.${match[2]}${match[3] ? `.${match[3]}` : ''}`,
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
} else {
|
|
131
|
-
// Plain SQL format - read first 50 lines
|
|
132
|
-
const header = await readFirstLines(dumpPath, 50)
|
|
133
|
-
const match = header.match(
|
|
134
|
-
/Dumped from database version (\d+)\.(\d+)(?:\.(\d+))?/,
|
|
135
|
-
)
|
|
136
|
-
if (match) {
|
|
137
|
-
return {
|
|
138
|
-
major: parseInt(match[1], 10),
|
|
139
|
-
minor: parseInt(match[2], 10),
|
|
140
|
-
patch: parseInt(match[3] || '0', 10),
|
|
141
|
-
full: `${match[1]}.${match[2]}${match[3] ? `.${match[3]}` : ''}`,
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
} catch (error) {
|
|
146
|
-
logDebug('Failed to parse dump version', {
|
|
147
|
-
dumpPath,
|
|
148
|
-
format,
|
|
149
|
-
error: error instanceof Error ? error.message : String(error),
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return null // Version not found in dump
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Get the version of pg_restore
|
|
157
|
-
export async function getPgRestoreVersion(
|
|
158
|
-
pgRestorePath: string,
|
|
159
|
-
): Promise<VersionInfo> {
|
|
160
|
-
const { stdout } = await execAsync(`"${pgRestorePath}" --version`)
|
|
161
|
-
return parseToolVersion(stdout)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// =============================================================================
|
|
165
|
-
// Compatibility Checking
|
|
166
|
-
// =============================================================================
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Check version compatibility - ONLY fails when dump is NEWER than tool
|
|
170
|
-
*
|
|
171
|
-
* | Scenario | Result |
|
|
172
|
-
* |----------|--------|
|
|
173
|
-
* | pg_restore v16 + dump from v14 | ✅ Works (backwards compatible) |
|
|
174
|
-
* | pg_restore v16 + dump from v16 | ✅ Works (same version) |
|
|
175
|
-
* | pg_restore v14 + dump from v16 | ❌ Fails (dump newer than tool) |
|
|
176
|
-
* | pg_restore v16 + dump from v10 | ⚠️ Works with warning (very old) |
|
|
177
|
-
*/
|
|
178
|
-
export function checkVersionCompatibility(
|
|
179
|
-
dumpVersion: VersionInfo | null,
|
|
180
|
-
toolVersion: VersionInfo,
|
|
181
|
-
): CompatibilityResult {
|
|
182
|
-
// If we couldn't parse dump version, proceed with warning
|
|
183
|
-
if (!dumpVersion) {
|
|
184
|
-
return {
|
|
185
|
-
compatible: true,
|
|
186
|
-
dumpVersion: null,
|
|
187
|
-
toolVersion,
|
|
188
|
-
warning: 'Could not detect dump version. Proceeding anyway.',
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// FAIL: Dump is newer than tool (e.g., pg_restore 14 + dump from 16)
|
|
193
|
-
if (dumpVersion.major > toolVersion.major) {
|
|
194
|
-
return {
|
|
195
|
-
compatible: false,
|
|
196
|
-
dumpVersion,
|
|
197
|
-
toolVersion,
|
|
198
|
-
error:
|
|
199
|
-
`Backup was created with PostgreSQL ${dumpVersion.major}, ` +
|
|
200
|
-
`but your pg_restore is version ${toolVersion.major}. ` +
|
|
201
|
-
`Install PostgreSQL ${dumpVersion.major} client tools to restore this backup.`,
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// WARN: Dump is very old (3+ major versions behind)
|
|
206
|
-
if (dumpVersion.major < toolVersion.major - 2) {
|
|
207
|
-
return {
|
|
208
|
-
compatible: true,
|
|
209
|
-
dumpVersion,
|
|
210
|
-
toolVersion,
|
|
211
|
-
warning:
|
|
212
|
-
`Backup was created with PostgreSQL ${dumpVersion.major}. ` +
|
|
213
|
-
`Some features may not restore correctly.`,
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// OK: Same version or dump is older (backwards compatible)
|
|
218
|
-
return { compatible: true, dumpVersion, toolVersion }
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// =============================================================================
|
|
222
|
-
// Main Validation Function
|
|
223
|
-
// =============================================================================
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Validate that a dump file can be restored with the available pg_restore
|
|
227
|
-
*
|
|
228
|
-
* @throws SpinDBError if versions are incompatible
|
|
229
|
-
*/
|
|
230
|
-
export async function validateRestoreCompatibility(options: {
|
|
231
|
-
dumpPath: string
|
|
232
|
-
format: string
|
|
233
|
-
pgRestorePath: string
|
|
234
|
-
}): Promise<{ dumpVersion: VersionInfo | null; toolVersion: VersionInfo }> {
|
|
235
|
-
const { dumpPath, format, pgRestorePath } = options
|
|
236
|
-
|
|
237
|
-
// Get tool version
|
|
238
|
-
const toolVersion = await getPgRestoreVersion(pgRestorePath)
|
|
239
|
-
logDebug('pg_restore version detected', { version: toolVersion.full })
|
|
240
|
-
|
|
241
|
-
// Get dump version
|
|
242
|
-
const dumpVersion = await parseDumpVersion(dumpPath, format, pgRestorePath)
|
|
243
|
-
if (dumpVersion) {
|
|
244
|
-
logDebug('Dump version detected', { version: dumpVersion.full })
|
|
245
|
-
} else {
|
|
246
|
-
logDebug('Could not detect dump version')
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Check compatibility
|
|
250
|
-
const result = checkVersionCompatibility(dumpVersion, toolVersion)
|
|
251
|
-
|
|
252
|
-
if (!result.compatible) {
|
|
253
|
-
throw new SpinDBError(
|
|
254
|
-
ErrorCodes.VERSION_MISMATCH,
|
|
255
|
-
result.error!,
|
|
256
|
-
'fatal',
|
|
257
|
-
`Install PostgreSQL ${dumpVersion!.major} client tools: brew install postgresql@${dumpVersion!.major}`,
|
|
258
|
-
{ dumpVersion, toolVersion },
|
|
259
|
-
)
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (result.warning) {
|
|
263
|
-
logWarning(result.warning)
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
return { dumpVersion, toolVersion }
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// =============================================================================
|
|
270
|
-
// Pre-Dump Compatibility Validation
|
|
271
|
-
// =============================================================================
|
|
272
|
-
|
|
273
|
-
export type DumpCompatibilityResult = {
|
|
274
|
-
compatible: boolean
|
|
275
|
-
localToolVersion: VersionInfo
|
|
276
|
-
remoteDbVersion: RemoteVersionResult
|
|
277
|
-
requiredAction: 'none' | 'use_direct_path' | 'switch_homebrew' | 'install'
|
|
278
|
-
alternativePath?: string // Direct path to correct version binary
|
|
279
|
-
switchTarget?: string // Major version to switch to
|
|
280
|
-
error?: string
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export async function getPgDumpVersion(
|
|
284
|
-
pgDumpPath: string,
|
|
285
|
-
): Promise<VersionInfo> {
|
|
286
|
-
const { stdout } = await execAsync(`"${pgDumpPath}" --version`)
|
|
287
|
-
return parseToolVersion(stdout)
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Validate that a remote database can be dumped with the current pg_dump
|
|
292
|
-
*
|
|
293
|
-
* This checks BEFORE dumping to avoid creating incompatible dump files.
|
|
294
|
-
* Returns the recommended action if the current pg_dump is incompatible.
|
|
295
|
-
*/
|
|
296
|
-
export async function validateDumpCompatibility(options: {
|
|
297
|
-
connectionString: string
|
|
298
|
-
pgDumpPath: string
|
|
299
|
-
}): Promise<DumpCompatibilityResult> {
|
|
300
|
-
const { connectionString, pgDumpPath } = options
|
|
301
|
-
|
|
302
|
-
// Get local pg_dump version
|
|
303
|
-
const localVersion = await getPgDumpVersion(pgDumpPath)
|
|
304
|
-
logDebug('Local pg_dump version', { version: localVersion.full })
|
|
305
|
-
|
|
306
|
-
// Detect remote database version
|
|
307
|
-
const remoteVersion = await detectRemotePostgresVersion(connectionString)
|
|
308
|
-
logDebug('Remote database version', {
|
|
309
|
-
version: remoteVersion.fullVersion,
|
|
310
|
-
serverType: remoteVersion.serverType,
|
|
311
|
-
})
|
|
312
|
-
|
|
313
|
-
// Check compatibility: local tool must be >= remote version
|
|
314
|
-
if (localVersion.major >= remoteVersion.majorVersion) {
|
|
315
|
-
return {
|
|
316
|
-
compatible: true,
|
|
317
|
-
localToolVersion: localVersion,
|
|
318
|
-
remoteDbVersion: remoteVersion,
|
|
319
|
-
requiredAction: 'none',
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// Version mismatch - check if we can use a direct path
|
|
324
|
-
const targetMajor = String(remoteVersion.majorVersion)
|
|
325
|
-
const directPath = await getDirectBinaryPath('pg_dump', targetMajor)
|
|
326
|
-
|
|
327
|
-
if (directPath) {
|
|
328
|
-
// Have a direct path to the correct version
|
|
329
|
-
return {
|
|
330
|
-
compatible: false,
|
|
331
|
-
localToolVersion: localVersion,
|
|
332
|
-
remoteDbVersion: remoteVersion,
|
|
333
|
-
requiredAction: 'use_direct_path',
|
|
334
|
-
alternativePath: directPath,
|
|
335
|
-
switchTarget: targetMajor,
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Check if any compatible version is installed via Homebrew
|
|
340
|
-
const compatibleVersion = await findCompatibleVersion(
|
|
341
|
-
remoteVersion.majorVersion,
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
if (compatibleVersion) {
|
|
345
|
-
const altPath = await getDirectBinaryPath(
|
|
346
|
-
'pg_dump',
|
|
347
|
-
compatibleVersion.majorVersion,
|
|
348
|
-
)
|
|
349
|
-
return {
|
|
350
|
-
compatible: false,
|
|
351
|
-
localToolVersion: localVersion,
|
|
352
|
-
remoteDbVersion: remoteVersion,
|
|
353
|
-
requiredAction: 'use_direct_path',
|
|
354
|
-
alternativePath: altPath || undefined,
|
|
355
|
-
switchTarget: compatibleVersion.majorVersion,
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// Check if we could switch Homebrew (version is installed but not as direct path)
|
|
360
|
-
const installed = await detectInstalledPostgres()
|
|
361
|
-
const hasTarget = installed.some(
|
|
362
|
-
(v) => parseInt(v.majorVersion, 10) >= remoteVersion.majorVersion,
|
|
363
|
-
)
|
|
364
|
-
|
|
365
|
-
if (hasTarget) {
|
|
366
|
-
const best = installed
|
|
367
|
-
.filter((v) => parseInt(v.majorVersion, 10) >= remoteVersion.majorVersion)
|
|
368
|
-
.sort(
|
|
369
|
-
(a, b) => parseInt(a.majorVersion, 10) - parseInt(b.majorVersion, 10),
|
|
370
|
-
)[0]
|
|
371
|
-
|
|
372
|
-
return {
|
|
373
|
-
compatible: false,
|
|
374
|
-
localToolVersion: localVersion,
|
|
375
|
-
remoteDbVersion: remoteVersion,
|
|
376
|
-
requiredAction: 'switch_homebrew',
|
|
377
|
-
switchTarget: best.majorVersion,
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Need to install - provide platform-specific instructions
|
|
382
|
-
const installCmd = await getInstallCommand(targetMajor)
|
|
383
|
-
return {
|
|
384
|
-
compatible: false,
|
|
385
|
-
localToolVersion: localVersion,
|
|
386
|
-
remoteDbVersion: remoteVersion,
|
|
387
|
-
requiredAction: 'install',
|
|
388
|
-
switchTarget: targetMajor,
|
|
389
|
-
error:
|
|
390
|
-
`Your pg_dump version (${localVersion.major}) cannot dump from PostgreSQL ${remoteVersion.majorVersion}. ` +
|
|
391
|
-
`Install PostgreSQL ${targetMajor} client tools: ${installCmd}`,
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export async function getInstallCommand(majorVersion: string): Promise<string> {
|
|
396
|
-
const pm = await detectPackageManager()
|
|
397
|
-
|
|
398
|
-
if (!pm) {
|
|
399
|
-
return `Install PostgreSQL ${majorVersion} client tools for your platform`
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// Versioned package names per package manager
|
|
403
|
-
const packages: Record<string, string> = {
|
|
404
|
-
brew: `postgresql@${majorVersion}`,
|
|
405
|
-
apt: `postgresql-client-${majorVersion}`,
|
|
406
|
-
yum: `postgresql${majorVersion}`,
|
|
407
|
-
dnf: `postgresql${majorVersion}`,
|
|
408
|
-
pacman: 'postgresql-libs', // Arch doesn't version packages the same way
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
const pkg = packages[pm.id] || `postgresql-${majorVersion}`
|
|
412
|
-
return pm.config.installTemplate.replace('{package}', pkg)
|
|
413
|
-
}
|
package/engines/qdrant/README.md
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
# Qdrant Engine Implementation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Qdrant is a vector similarity search engine with a REST API. Unlike traditional databases, Qdrant is interacted with via HTTP, not a CLI shell.
|
|
6
|
-
|
|
7
|
-
## Platform Support
|
|
8
|
-
|
|
9
|
-
| Platform | Architecture | Status | Notes |
|
|
10
|
-
|----------|--------------|--------|-------|
|
|
11
|
-
| darwin | x64 | Supported | Uses hostdb binaries |
|
|
12
|
-
| darwin | arm64 | Supported | Uses hostdb binaries (Apple Silicon) |
|
|
13
|
-
| linux | x64 | Supported | Uses hostdb binaries |
|
|
14
|
-
| linux | arm64 | Supported | Uses hostdb binaries |
|
|
15
|
-
| win32 | x64 | Supported | Uses hostdb binaries |
|
|
16
|
-
|
|
17
|
-
## Binary Packaging
|
|
18
|
-
|
|
19
|
-
### Archive Format
|
|
20
|
-
- **Unix (macOS/Linux)**: `tar.gz`
|
|
21
|
-
- **Windows**: `zip`
|
|
22
|
-
|
|
23
|
-
### Archive Structure
|
|
24
|
-
```
|
|
25
|
-
qdrant/
|
|
26
|
-
└── bin/
|
|
27
|
-
└── qdrant # Server binary
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Version Map Sync
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
export const QDRANT_VERSION_MAP: Record<string, string> = {
|
|
34
|
-
'1': '1.16.3',
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Implementation Details
|
|
39
|
-
|
|
40
|
-
### Binary Manager
|
|
41
|
-
|
|
42
|
-
Qdrant uses `BaseBinaryManager` with standard configuration.
|
|
43
|
-
|
|
44
|
-
### Version Parsing
|
|
45
|
-
|
|
46
|
-
- **Version output format**: `qdrant 1.16.3` or `v1.16.3`
|
|
47
|
-
- **Parse pattern**: `/(?:qdrant\s+)?v?(\d+\.\d+\.\d+)/`
|
|
48
|
-
|
|
49
|
-
### REST API Engine
|
|
50
|
-
|
|
51
|
-
Qdrant is a **REST API engine** - it doesn't have a CLI shell:
|
|
52
|
-
- `spindb run` is **NOT applicable**
|
|
53
|
-
- `spindb connect` opens the web dashboard in browser
|
|
54
|
-
- All data operations use HTTP REST API
|
|
55
|
-
|
|
56
|
-
### Dual Ports
|
|
57
|
-
|
|
58
|
-
Qdrant uses two ports:
|
|
59
|
-
- **HTTP Port** (default 6333): REST API
|
|
60
|
-
- **gRPC Port** (default 6334): gRPC API (typically HTTP + 1)
|
|
61
|
-
|
|
62
|
-
### Default Configuration
|
|
63
|
-
|
|
64
|
-
- **Default HTTP Port**: 6333 (auto-increments on conflict)
|
|
65
|
-
- **gRPC Port**: HTTP port + 1
|
|
66
|
-
- **Health Endpoint**: `/healthz`
|
|
67
|
-
- **Dashboard**: `/dashboard`
|
|
68
|
-
- **PID File**: `qdrant.pid` in container directory
|
|
69
|
-
|
|
70
|
-
### YAML Configuration
|
|
71
|
-
|
|
72
|
-
Qdrant uses YAML configuration (`config.yaml`):
|
|
73
|
-
|
|
74
|
-
```yaml
|
|
75
|
-
storage:
|
|
76
|
-
storage_path: /path/to/data
|
|
77
|
-
service:
|
|
78
|
-
http_port: 6333
|
|
79
|
-
grpc_port: 6334
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Connection String Format
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
http://127.0.0.1:{port}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Web Dashboard
|
|
89
|
-
|
|
90
|
-
Qdrant has a built-in web dashboard at:
|
|
91
|
-
```
|
|
92
|
-
http://localhost:{port}/dashboard
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The `connect` command opens this URL in the default browser using platform-specific commands (`open`, `xdg-open`, `cmd /c start`).
|
|
96
|
-
|
|
97
|
-
## Backup & Restore
|
|
98
|
-
|
|
99
|
-
### Backup Formats
|
|
100
|
-
|
|
101
|
-
| Format | Extension | Tool | Notes |
|
|
102
|
-
|--------|-----------|------|-------|
|
|
103
|
-
| snapshot | `.snapshot` | REST API | Qdrant native snapshot |
|
|
104
|
-
|
|
105
|
-
### Snapshot API
|
|
106
|
-
|
|
107
|
-
Backup and restore use Qdrant's snapshot REST endpoints:
|
|
108
|
-
- `POST /collections/{name}/snapshots` - Create snapshot
|
|
109
|
-
- `PUT /collections/{name}/snapshots/recover` - Restore snapshot
|
|
110
|
-
|
|
111
|
-
## Integration Test Notes
|
|
112
|
-
|
|
113
|
-
### REST API Testing
|
|
114
|
-
|
|
115
|
-
Integration tests use `fetch()` or `curl` for operations, not CLI tools.
|
|
116
|
-
|
|
117
|
-
### Test Fixtures
|
|
118
|
-
|
|
119
|
-
Located in `tests/fixtures/qdrant/seeds/`:
|
|
120
|
-
- `README.md` documenting the API-based approach (no SQL/script files)
|
|
121
|
-
|
|
122
|
-
## Docker E2E Test Notes
|
|
123
|
-
|
|
124
|
-
Qdrant Docker E2E uses `curl` for all operations:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
# Health check
|
|
128
|
-
curl http://localhost:6333/healthz
|
|
129
|
-
|
|
130
|
-
# Create collection
|
|
131
|
-
curl -X PUT http://localhost:6333/collections/test \
|
|
132
|
-
-H 'Content-Type: application/json' \
|
|
133
|
-
-d '{"vectors":{"size":4,"distance":"Dot"}}'
|
|
134
|
-
|
|
135
|
-
# Insert vectors
|
|
136
|
-
curl -X PUT http://localhost:6333/collections/test/points \
|
|
137
|
-
-H 'Content-Type: application/json' \
|
|
138
|
-
-d '{"points":[...]}'
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Backup/Restore Skipped in Docker E2E
|
|
142
|
-
|
|
143
|
-
Qdrant backup/restore tests are skipped in Docker E2E (covered by integration tests).
|
|
144
|
-
|
|
145
|
-
## Known Issues & Gotchas
|
|
146
|
-
|
|
147
|
-
### 1. No CLI Shell
|
|
148
|
-
|
|
149
|
-
`spindb run` does nothing for Qdrant. Use the REST API or web dashboard.
|
|
150
|
-
|
|
151
|
-
### 2. Vector Database Semantics
|
|
152
|
-
|
|
153
|
-
Qdrant uses "collections" instead of "databases". Operations are vector-centric:
|
|
154
|
-
- Insert points with vectors
|
|
155
|
-
- Search by vector similarity
|
|
156
|
-
- Filter by payload
|
|
157
|
-
|
|
158
|
-
### 3. gRPC Port
|
|
159
|
-
|
|
160
|
-
The gRPC port is separate from HTTP. Ensure both ports are available if using gRPC clients.
|
|
161
|
-
|
|
162
|
-
### 4. Snapshot Format
|
|
163
|
-
|
|
164
|
-
Snapshots are Qdrant's native format and are not compatible with other databases.
|
|
165
|
-
|
|
166
|
-
### 5. Health Check Endpoint
|
|
167
|
-
|
|
168
|
-
Use `/healthz` (not `/health`) for health checks.
|
|
169
|
-
|
|
170
|
-
## CI/CD Notes
|
|
171
|
-
|
|
172
|
-
### curl-Based Testing
|
|
173
|
-
|
|
174
|
-
CI tests use `curl` commands rather than database CLI tools.
|
|
175
|
-
|
|
176
|
-
### GitHub Actions Cache Step
|
|
177
|
-
|
|
178
|
-
```yaml
|
|
179
|
-
- name: Cache Qdrant binaries
|
|
180
|
-
uses: actions/cache@v4
|
|
181
|
-
with:
|
|
182
|
-
path: ~/.spindb/bin/qdrant-*
|
|
183
|
-
key: qdrant-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('engines/qdrant/version-maps.ts') }}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## REST API Quick Reference
|
|
187
|
-
|
|
188
|
-
### Collections
|
|
189
|
-
```bash
|
|
190
|
-
# List collections
|
|
191
|
-
GET /collections
|
|
192
|
-
|
|
193
|
-
# Create collection
|
|
194
|
-
PUT /collections/{name}
|
|
195
|
-
|
|
196
|
-
# Delete collection
|
|
197
|
-
DELETE /collections/{name}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Points (Vectors)
|
|
201
|
-
```bash
|
|
202
|
-
# Upsert points
|
|
203
|
-
PUT /collections/{name}/points
|
|
204
|
-
|
|
205
|
-
# Search
|
|
206
|
-
POST /collections/{name}/points/search
|
|
207
|
-
|
|
208
|
-
# Get point
|
|
209
|
-
GET /collections/{name}/points/{id}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Snapshots
|
|
213
|
-
```bash
|
|
214
|
-
# Create snapshot
|
|
215
|
-
POST /collections/{name}/snapshots
|
|
216
|
-
|
|
217
|
-
# List snapshots
|
|
218
|
-
GET /collections/{name}/snapshots
|
|
219
|
-
|
|
220
|
-
# Recover from snapshot
|
|
221
|
-
PUT /collections/{name}/snapshots/recover
|
|
222
|
-
```
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Qdrant REST API client utilities
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Make an HTTP request to Qdrant REST API
|
|
7
|
-
*
|
|
8
|
-
* @param port - The HTTP port Qdrant is listening on
|
|
9
|
-
* @param method - HTTP method (GET, POST, PUT, DELETE)
|
|
10
|
-
* @param path - API path (e.g., '/collections', '/snapshots')
|
|
11
|
-
* @param body - Optional JSON body for POST/PUT requests
|
|
12
|
-
* @param timeoutMs - Request timeout in milliseconds (default: 30s)
|
|
13
|
-
*/
|
|
14
|
-
export async function qdrantApiRequest(
|
|
15
|
-
port: number,
|
|
16
|
-
method: string,
|
|
17
|
-
path: string,
|
|
18
|
-
body?: Record<string, unknown>,
|
|
19
|
-
timeoutMs = 30000,
|
|
20
|
-
): Promise<{ status: number; data: unknown }> {
|
|
21
|
-
const url = `http://127.0.0.1:${port}${path}`
|
|
22
|
-
|
|
23
|
-
const controller = new AbortController()
|
|
24
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs)
|
|
25
|
-
|
|
26
|
-
const options: RequestInit = {
|
|
27
|
-
method,
|
|
28
|
-
headers: {
|
|
29
|
-
'Content-Type': 'application/json',
|
|
30
|
-
},
|
|
31
|
-
signal: controller.signal,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (body) {
|
|
35
|
-
options.body = JSON.stringify(body)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const response = await fetch(url, options)
|
|
40
|
-
|
|
41
|
-
// Try to parse as JSON, fall back to text for endpoints like /healthz
|
|
42
|
-
let data: unknown
|
|
43
|
-
const contentType = response.headers.get('content-type') || ''
|
|
44
|
-
if (contentType.includes('application/json')) {
|
|
45
|
-
data = await response.json()
|
|
46
|
-
} else {
|
|
47
|
-
data = await response.text()
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return { status: response.status, data }
|
|
51
|
-
} catch (error) {
|
|
52
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
53
|
-
throw new Error(
|
|
54
|
-
`Qdrant API request timed out after ${timeoutMs / 1000}s: ${method} ${path}`,
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
throw error
|
|
58
|
-
} finally {
|
|
59
|
-
clearTimeout(timeoutId)
|
|
60
|
-
}
|
|
61
|
-
}
|