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,257 +0,0 @@
|
|
|
1
|
-
# CouchDB Engine Implementation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
CouchDB is a document-oriented database with a REST API. Like Qdrant and Meilisearch, it uses HTTP for all operations. CouchDB includes the Fauxton web dashboard.
|
|
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 `.cmd` batch file (see below) |
|
|
16
|
-
|
|
17
|
-
### Windows Binary - .cmd Not .exe
|
|
18
|
-
|
|
19
|
-
**Critical**: CouchDB on Windows uses a **batch file** (`couchdb.cmd`), not an executable:
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
couchdb/bin/couchdb.cmd # NOT couchdb.exe
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The binary manager has a helper `getCouchDBExtension()` that returns `.cmd` on Windows.
|
|
26
|
-
|
|
27
|
-
## Binary Packaging
|
|
28
|
-
|
|
29
|
-
### Archive Format
|
|
30
|
-
- **Unix (macOS/Linux)**: `tar.gz`
|
|
31
|
-
- **Windows**: `zip`
|
|
32
|
-
|
|
33
|
-
### Archive Structure
|
|
34
|
-
```text
|
|
35
|
-
couchdb/
|
|
36
|
-
├── bin/
|
|
37
|
-
│ ├── couchdb # Unix: shell script
|
|
38
|
-
│ └── couchdb.cmd # Windows: batch file
|
|
39
|
-
├── lib/ # Erlang libraries
|
|
40
|
-
├── etc/ # Configuration
|
|
41
|
-
└── share/ # Data files
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### CouchDB is an Erlang Application
|
|
45
|
-
|
|
46
|
-
CouchDB is written in Erlang. This has implications:
|
|
47
|
-
- No `--version` flag (Erlang tries to start on any arguments)
|
|
48
|
-
- Binary verification only checks file existence
|
|
49
|
-
- Startup involves the Erlang runtime
|
|
50
|
-
|
|
51
|
-
### Version Map Sync
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
export const COUCHDB_VERSION_MAP: Record<string, string> = {
|
|
55
|
-
'3': '3.5.1',
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Implementation Details
|
|
60
|
-
|
|
61
|
-
### Binary Manager
|
|
62
|
-
|
|
63
|
-
CouchDB uses `BaseBinaryManager` with a custom `verify()` override:
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
// CouchDB doesn't support --version (tries to start)
|
|
67
|
-
// Verification just checks binary existence
|
|
68
|
-
async verify(): Promise<boolean> {
|
|
69
|
-
return existsSync(binaryPath)
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### REST API Engine
|
|
74
|
-
|
|
75
|
-
CouchDB is a **REST API engine**:
|
|
76
|
-
- `spindb run` is **NOT applicable**
|
|
77
|
-
- `spindb connect` opens Fauxton dashboard in browser
|
|
78
|
-
- All operations use HTTP REST API
|
|
79
|
-
|
|
80
|
-
### Default Configuration
|
|
81
|
-
|
|
82
|
-
- **Default Port**: 5984 (auto-increments on conflict)
|
|
83
|
-
- **Health Endpoint**: `/` (root - returns JSON with version)
|
|
84
|
-
- **Dashboard (Fauxton)**: `/_utils`
|
|
85
|
-
- **Default Credentials**: `admin` / `admin`
|
|
86
|
-
- **PID File**: `couchdb.pid` in container directory
|
|
87
|
-
|
|
88
|
-
### Fauxton Authentication
|
|
89
|
-
|
|
90
|
-
CouchDB 3.x requires an admin account. Even with `require_valid_user = false`:
|
|
91
|
-
- Fauxton's session-based auth still shows a login screen
|
|
92
|
-
- Default credentials: `admin` / `admin`
|
|
93
|
-
- The shell handler shows credentials before opening browser
|
|
94
|
-
|
|
95
|
-
### Connection String Format
|
|
96
|
-
|
|
97
|
-
```text
|
|
98
|
-
http://127.0.0.1:{port}/{database}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Web Dashboard (Fauxton)
|
|
102
|
-
|
|
103
|
-
Fauxton dashboard is at:
|
|
104
|
-
```text
|
|
105
|
-
http://localhost:{port}/_utils
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Backup & Restore
|
|
109
|
-
|
|
110
|
-
### Backup Formats
|
|
111
|
-
|
|
112
|
-
| Format | Extension | Tool | Notes |
|
|
113
|
-
|--------|-----------|------|-------|
|
|
114
|
-
| json | `.json` | REST API | JSON documents |
|
|
115
|
-
|
|
116
|
-
### Backup Method
|
|
117
|
-
|
|
118
|
-
Uses CouchDB's bulk document APIs:
|
|
119
|
-
- `GET /{db}/_all_docs?include_docs=true` - Export all documents
|
|
120
|
-
- `POST /{db}/_bulk_docs` - Import documents
|
|
121
|
-
|
|
122
|
-
### No Native Snapshot
|
|
123
|
-
|
|
124
|
-
Unlike Qdrant/Meilisearch, CouchDB doesn't have a native snapshot format. Backup is JSON export.
|
|
125
|
-
|
|
126
|
-
## Integration Test Notes
|
|
127
|
-
|
|
128
|
-
### REST API Testing
|
|
129
|
-
|
|
130
|
-
Integration tests use `fetch()` or `curl`.
|
|
131
|
-
|
|
132
|
-
### Test Fixtures
|
|
133
|
-
|
|
134
|
-
Located in `tests/fixtures/couchdb/seeds/`:
|
|
135
|
-
- `README.md` documenting the API-based approach
|
|
136
|
-
|
|
137
|
-
## Docker E2E Test Notes
|
|
138
|
-
|
|
139
|
-
CouchDB Docker E2E uses `curl`:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Health check
|
|
143
|
-
curl http://localhost:5984/
|
|
144
|
-
|
|
145
|
-
# Create database
|
|
146
|
-
curl -X PUT http://admin:admin@localhost:5984/mydb
|
|
147
|
-
|
|
148
|
-
# Add document
|
|
149
|
-
curl -X POST http://admin:admin@localhost:5984/mydb \
|
|
150
|
-
-H 'Content-Type: application/json' \
|
|
151
|
-
-d '{"name":"test"}'
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Backup/Restore Skipped in Docker E2E
|
|
155
|
-
|
|
156
|
-
CouchDB backup/restore tests are skipped in Docker E2E (covered by integration tests).
|
|
157
|
-
|
|
158
|
-
## Known Issues & Gotchas
|
|
159
|
-
|
|
160
|
-
### 1. No --version Flag
|
|
161
|
-
|
|
162
|
-
CouchDB is an Erlang application that tries to start when run with any arguments. You cannot run `couchdb --version`. Binary verification only checks file existence.
|
|
163
|
-
|
|
164
|
-
### 2. Windows Uses .cmd
|
|
165
|
-
|
|
166
|
-
On Windows, the binary is `couchdb.cmd` (batch file), NOT `couchdb.exe`. This is handled by `getCouchDBExtension()`.
|
|
167
|
-
|
|
168
|
-
### 3. No CLI Shell
|
|
169
|
-
|
|
170
|
-
`spindb run` does nothing for CouchDB. Use the REST API or Fauxton.
|
|
171
|
-
|
|
172
|
-
### 4. Authentication Required
|
|
173
|
-
|
|
174
|
-
Fauxton requires authentication even for local development:
|
|
175
|
-
- Username: `admin`
|
|
176
|
-
- Password: `admin`
|
|
177
|
-
|
|
178
|
-
### 5. Database Creation is Explicit
|
|
179
|
-
|
|
180
|
-
Unlike MongoDB, databases must be explicitly created via PUT request:
|
|
181
|
-
```bash
|
|
182
|
-
curl -X PUT http://admin:admin@localhost:5984/newdb
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### 6. Health Check at Root
|
|
186
|
-
|
|
187
|
-
The root path `/` returns health/version info:
|
|
188
|
-
```json
|
|
189
|
-
{"couchdb":"Welcome","version":"3.5.1","features":[...]}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## CI/CD Notes
|
|
193
|
-
|
|
194
|
-
### curl-Based Testing
|
|
195
|
-
|
|
196
|
-
CI tests use `curl` commands.
|
|
197
|
-
|
|
198
|
-
### GitHub Actions Cache Step
|
|
199
|
-
|
|
200
|
-
```yaml
|
|
201
|
-
- name: Cache CouchDB binaries
|
|
202
|
-
uses: actions/cache@v4
|
|
203
|
-
with:
|
|
204
|
-
path: ~/.spindb/bin/couchdb-*
|
|
205
|
-
key: couchdb-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('engines/couchdb/version-maps.ts') }}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
## REST API Quick Reference
|
|
209
|
-
|
|
210
|
-
### Databases
|
|
211
|
-
```bash
|
|
212
|
-
# List databases
|
|
213
|
-
GET /_all_dbs
|
|
214
|
-
|
|
215
|
-
# Create database
|
|
216
|
-
PUT /{db}
|
|
217
|
-
|
|
218
|
-
# Delete database
|
|
219
|
-
DELETE /{db}
|
|
220
|
-
|
|
221
|
-
# Get database info
|
|
222
|
-
GET /{db}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### Documents
|
|
226
|
-
```bash
|
|
227
|
-
# Create document (server-generated ID)
|
|
228
|
-
POST /{db}
|
|
229
|
-
|
|
230
|
-
# Create/update document (specified ID)
|
|
231
|
-
PUT /{db}/{id}
|
|
232
|
-
|
|
233
|
-
# Get document
|
|
234
|
-
GET /{db}/{id}
|
|
235
|
-
|
|
236
|
-
# Delete document
|
|
237
|
-
DELETE /{db}/{id}?rev={rev}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Bulk Operations
|
|
241
|
-
```bash
|
|
242
|
-
# Get all documents
|
|
243
|
-
GET /{db}/_all_docs?include_docs=true
|
|
244
|
-
|
|
245
|
-
# Bulk insert
|
|
246
|
-
POST /{db}/_bulk_docs
|
|
247
|
-
{"docs": [...]}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Admin
|
|
251
|
-
```bash
|
|
252
|
-
# Server info/health
|
|
253
|
-
GET /
|
|
254
|
-
|
|
255
|
-
# Session info
|
|
256
|
-
GET /_session
|
|
257
|
-
```
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared CouchDB REST API client utilities
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// Default admin credentials for local development
|
|
6
|
-
// CouchDB 3.x requires admin account to start
|
|
7
|
-
export const DEFAULT_ADMIN_USER = 'admin'
|
|
8
|
-
export const DEFAULT_ADMIN_PASSWORD = 'admin'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Make an HTTP request to CouchDB REST API
|
|
12
|
-
*
|
|
13
|
-
* @param port - The HTTP port CouchDB is listening on
|
|
14
|
-
* @param method - HTTP method (GET, POST, PUT, DELETE)
|
|
15
|
-
* @param path - API path (e.g., '/', '/_all_dbs', '/mydb')
|
|
16
|
-
* @param body - Optional JSON body for POST/PUT requests
|
|
17
|
-
* @param timeoutMs - Request timeout in milliseconds (default: 30s)
|
|
18
|
-
* @param auth - Optional authentication credentials (defaults to admin:admin)
|
|
19
|
-
*/
|
|
20
|
-
export async function couchdbApiRequest(
|
|
21
|
-
port: number,
|
|
22
|
-
method: string,
|
|
23
|
-
path: string,
|
|
24
|
-
body?: Record<string, unknown>,
|
|
25
|
-
timeoutMs = 30000,
|
|
26
|
-
auth: { username: string; password: string } | null = {
|
|
27
|
-
username: DEFAULT_ADMIN_USER,
|
|
28
|
-
password: DEFAULT_ADMIN_PASSWORD,
|
|
29
|
-
},
|
|
30
|
-
): Promise<{ status: number; data: unknown }> {
|
|
31
|
-
const url = `http://127.0.0.1:${port}${path}`
|
|
32
|
-
|
|
33
|
-
const controller = new AbortController()
|
|
34
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs)
|
|
35
|
-
|
|
36
|
-
const headers: Record<string, string> = {
|
|
37
|
-
'Content-Type': 'application/json',
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Add basic auth header if credentials provided
|
|
41
|
-
if (auth) {
|
|
42
|
-
const credentials = Buffer.from(
|
|
43
|
-
`${auth.username}:${auth.password}`,
|
|
44
|
-
).toString('base64')
|
|
45
|
-
headers['Authorization'] = `Basic ${credentials}`
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const options: RequestInit = {
|
|
49
|
-
method,
|
|
50
|
-
headers,
|
|
51
|
-
signal: controller.signal,
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (body) {
|
|
55
|
-
options.body = JSON.stringify(body)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
try {
|
|
59
|
-
const response = await fetch(url, options)
|
|
60
|
-
|
|
61
|
-
// Try to parse as JSON, CouchDB always returns JSON
|
|
62
|
-
let data: unknown
|
|
63
|
-
const contentType = response.headers.get('content-type') || ''
|
|
64
|
-
if (contentType.includes('application/json')) {
|
|
65
|
-
data = await response.json()
|
|
66
|
-
} else {
|
|
67
|
-
data = await response.text()
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return { status: response.status, data }
|
|
71
|
-
} catch (error) {
|
|
72
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
73
|
-
throw new Error(
|
|
74
|
-
`CouchDB API request timed out after ${timeoutMs / 1000}s: ${method} ${path}`,
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
throw error
|
|
78
|
-
} finally {
|
|
79
|
-
clearTimeout(timeoutId)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CouchDB backup module
|
|
3
|
-
* Supports JSON-based backup using CouchDB's REST API
|
|
4
|
-
*
|
|
5
|
-
* CouchDB backup strategy:
|
|
6
|
-
* - Export all documents from each database using _all_docs?include_docs=true
|
|
7
|
-
* - Store as a JSON file with metadata about databases and their documents
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { mkdir, stat, writeFile } from 'fs/promises'
|
|
11
|
-
import { existsSync } from 'fs'
|
|
12
|
-
import { dirname } from 'path'
|
|
13
|
-
import { logDebug } from '../../core/error-handler'
|
|
14
|
-
import { couchdbApiRequest } from './api-client'
|
|
15
|
-
import type { ContainerConfig, BackupOptions, BackupResult } from '../../types'
|
|
16
|
-
|
|
17
|
-
// Backup operations may take longer than the default timeout
|
|
18
|
-
const BACKUP_TIMEOUT_MS = 600000 // 10 minutes
|
|
19
|
-
|
|
20
|
-
type CouchDBBackup = {
|
|
21
|
-
version: string
|
|
22
|
-
created: string
|
|
23
|
-
databases: Array<{
|
|
24
|
-
name: string
|
|
25
|
-
docs: unknown[]
|
|
26
|
-
}>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Create a JSON backup of all databases using CouchDB's REST API
|
|
31
|
-
*/
|
|
32
|
-
export async function createBackup(
|
|
33
|
-
container: ContainerConfig,
|
|
34
|
-
outputPath: string,
|
|
35
|
-
options: BackupOptions,
|
|
36
|
-
): Promise<BackupResult> {
|
|
37
|
-
const { port } = container
|
|
38
|
-
const targetDatabase = options.database
|
|
39
|
-
|
|
40
|
-
// Ensure output directory exists
|
|
41
|
-
const outputDir = dirname(outputPath)
|
|
42
|
-
if (!existsSync(outputDir)) {
|
|
43
|
-
await mkdir(outputDir, { recursive: true })
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Get CouchDB version info
|
|
47
|
-
const infoResponse = await couchdbApiRequest(port, 'GET', '/')
|
|
48
|
-
const serverInfo = infoResponse.data as { version?: string }
|
|
49
|
-
const serverVersion = serverInfo?.version || 'unknown'
|
|
50
|
-
|
|
51
|
-
// Get list of databases to backup
|
|
52
|
-
let databasesToBackup: string[]
|
|
53
|
-
|
|
54
|
-
if (targetDatabase) {
|
|
55
|
-
// Backup specific database
|
|
56
|
-
databasesToBackup = [targetDatabase]
|
|
57
|
-
} else {
|
|
58
|
-
// Backup all user databases (excluding system databases)
|
|
59
|
-
const dbsResponse = await couchdbApiRequest(port, 'GET', '/_all_dbs')
|
|
60
|
-
if (dbsResponse.status !== 200) {
|
|
61
|
-
throw new Error(
|
|
62
|
-
`Failed to list databases: ${JSON.stringify(dbsResponse.data)}`,
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
const allDbs = dbsResponse.data as string[]
|
|
66
|
-
// Filter out system databases (starting with _)
|
|
67
|
-
databasesToBackup = allDbs.filter((db) => !db.startsWith('_'))
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
logDebug(`Backing up ${databasesToBackup.length} database(s)`)
|
|
71
|
-
|
|
72
|
-
// Export documents from each database
|
|
73
|
-
const backup: CouchDBBackup = {
|
|
74
|
-
version: serverVersion,
|
|
75
|
-
created: new Date().toISOString(),
|
|
76
|
-
databases: [],
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
for (const dbName of databasesToBackup) {
|
|
80
|
-
logDebug(`Exporting database: ${dbName}`)
|
|
81
|
-
|
|
82
|
-
const docsResponse = await couchdbApiRequest(
|
|
83
|
-
port,
|
|
84
|
-
'GET',
|
|
85
|
-
`/${encodeURIComponent(dbName)}/_all_docs?include_docs=true`,
|
|
86
|
-
undefined,
|
|
87
|
-
BACKUP_TIMEOUT_MS,
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
if (docsResponse.status !== 200) {
|
|
91
|
-
throw new Error(
|
|
92
|
-
`Failed to export database ${dbName}: ${JSON.stringify(docsResponse.data)}`,
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const docsData = docsResponse.data as {
|
|
97
|
-
rows?: Array<{ doc?: unknown }>
|
|
98
|
-
}
|
|
99
|
-
const docs =
|
|
100
|
-
docsData.rows
|
|
101
|
-
?.map((row) => row.doc)
|
|
102
|
-
.filter((doc): doc is unknown => doc !== undefined) || []
|
|
103
|
-
|
|
104
|
-
// Filter out design documents for cleaner backup (they start with _design/)
|
|
105
|
-
const userDocs = docs.filter((doc) => {
|
|
106
|
-
const d = doc as { _id?: string }
|
|
107
|
-
return d._id && !d._id.startsWith('_design/')
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
backup.databases.push({
|
|
111
|
-
name: dbName,
|
|
112
|
-
docs: userDocs,
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Write backup to file
|
|
117
|
-
await writeFile(outputPath, JSON.stringify(backup, null, 2))
|
|
118
|
-
|
|
119
|
-
const stats = await stat(outputPath)
|
|
120
|
-
|
|
121
|
-
return {
|
|
122
|
-
path: outputPath,
|
|
123
|
-
format: 'json',
|
|
124
|
-
size: stats.size,
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Create a backup for cloning purposes
|
|
130
|
-
*/
|
|
131
|
-
export async function createCloneBackup(
|
|
132
|
-
container: ContainerConfig,
|
|
133
|
-
outputPath: string,
|
|
134
|
-
): Promise<BackupResult> {
|
|
135
|
-
// Backup all databases for cloning
|
|
136
|
-
return createBackup(container, outputPath, { database: '' })
|
|
137
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CouchDB Binary Manager
|
|
3
|
-
*
|
|
4
|
-
* Handles downloading, extracting, and managing CouchDB binaries from hostdb.
|
|
5
|
-
* Extends BaseBinaryManager for shared download/extraction logic.
|
|
6
|
-
*
|
|
7
|
-
* Note: CouchDB doesn't support --version flag. It's an Erlang application that
|
|
8
|
-
* tries to start the server when run, so we override verify() to just check
|
|
9
|
-
* binary existence instead of running it.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { existsSync } from 'fs'
|
|
13
|
-
import { join } from 'path'
|
|
14
|
-
import {
|
|
15
|
-
BaseBinaryManager,
|
|
16
|
-
type BinaryManagerConfig,
|
|
17
|
-
} from '../../core/base-binary-manager'
|
|
18
|
-
import { getBinaryUrl } from './binary-urls'
|
|
19
|
-
import { normalizeVersion } from './version-maps'
|
|
20
|
-
import { Engine, Platform, type Arch } from '../../types'
|
|
21
|
-
import { paths } from '../../config/paths'
|
|
22
|
-
|
|
23
|
-
class CouchDBBinaryManager extends BaseBinaryManager {
|
|
24
|
-
protected readonly config: BinaryManagerConfig = {
|
|
25
|
-
engine: Engine.CouchDB,
|
|
26
|
-
engineName: 'couchdb',
|
|
27
|
-
displayName: 'CouchDB',
|
|
28
|
-
serverBinary: 'couchdb',
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
protected getBinaryUrlFromModule(
|
|
32
|
-
version: string,
|
|
33
|
-
platform: Platform,
|
|
34
|
-
arch: Arch,
|
|
35
|
-
): string {
|
|
36
|
-
return getBinaryUrl(version, platform, arch)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
protected normalizeVersionFromModule(version: string): string {
|
|
40
|
-
return normalizeVersion(version)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
protected parseVersionFromOutput(stdout: string): string | null {
|
|
44
|
-
// Extract version from output like "couchdb 3.5.1" or "Apache CouchDB 3.5.1"
|
|
45
|
-
const match = stdout.match(
|
|
46
|
-
/(?:couchdb\s+)?(?:Apache CouchDB\s+)?v?(\d+\.\d+\.\d+)/i,
|
|
47
|
-
)
|
|
48
|
-
return match?.[1] ?? null
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Override verify to just check binary existence.
|
|
53
|
-
* CouchDB doesn't support --version flag - it's an Erlang application that
|
|
54
|
-
* tries to start the server when run with any arguments.
|
|
55
|
-
*
|
|
56
|
-
* Note: On Windows, CouchDB uses a .cmd batch file, not .exe
|
|
57
|
-
*/
|
|
58
|
-
async verify(
|
|
59
|
-
version: string,
|
|
60
|
-
platform: Platform,
|
|
61
|
-
arch: Arch,
|
|
62
|
-
): Promise<boolean> {
|
|
63
|
-
const fullVersion = this.getFullVersion(version)
|
|
64
|
-
const binPath = paths.getBinaryPath({
|
|
65
|
-
engine: this.config.engineName,
|
|
66
|
-
version: fullVersion,
|
|
67
|
-
platform,
|
|
68
|
-
arch,
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
// CouchDB on Windows uses .cmd batch file, not .exe
|
|
72
|
-
const ext = platform === Platform.Win32 ? '.cmd' : ''
|
|
73
|
-
const serverPath = join(binPath, 'bin', `${this.config.serverBinary}${ext}`)
|
|
74
|
-
|
|
75
|
-
if (!existsSync(serverPath)) {
|
|
76
|
-
throw new Error(
|
|
77
|
-
`${this.config.displayName} binary not found at ${binPath}/bin/`,
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Just verify the binary exists - we can't run --version on CouchDB
|
|
82
|
-
return true
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export const couchdbBinaryManager = new CouchDBBinaryManager()
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { COUCHDB_VERSION_MAP } from './version-maps'
|
|
2
|
-
import { buildHostdbUrl } from '../../core/hostdb-client'
|
|
3
|
-
import { logDebug } from '../../core/error-handler'
|
|
4
|
-
import { Engine, Platform, type Arch } from '../../types'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Supported platform identifiers for hostdb downloads.
|
|
8
|
-
* hostdb uses standard Node.js platform naming - this set validates
|
|
9
|
-
* that a platform/arch combination is supported, not transforms it.
|
|
10
|
-
*/
|
|
11
|
-
const SUPPORTED_PLATFORMS = new Set([
|
|
12
|
-
'darwin-arm64',
|
|
13
|
-
'darwin-x64',
|
|
14
|
-
'linux-arm64',
|
|
15
|
-
'linux-x64',
|
|
16
|
-
'win32-x64',
|
|
17
|
-
])
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Get the hostdb platform identifier
|
|
21
|
-
*
|
|
22
|
-
* hostdb uses standard platform naming that matches Node.js identifiers directly.
|
|
23
|
-
* This function validates the platform/arch combination is supported.
|
|
24
|
-
*
|
|
25
|
-
* @param platform - Node.js platform (e.g., 'darwin', 'linux', 'win32')
|
|
26
|
-
* @param arch - Node.js architecture (e.g., 'arm64', 'x64')
|
|
27
|
-
* @returns hostdb platform identifier or null if unsupported
|
|
28
|
-
*/
|
|
29
|
-
export function getHostdbPlatform(
|
|
30
|
-
platform: Platform,
|
|
31
|
-
arch: Arch,
|
|
32
|
-
): string | null {
|
|
33
|
-
const key = `${platform}-${arch}`
|
|
34
|
-
return SUPPORTED_PLATFORMS.has(key) ? key : null
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Build the download URL for CouchDB binaries from hostdb
|
|
39
|
-
*
|
|
40
|
-
* Format: https://registry.layerbase.host/couchdb-{version}/couchdb-{version}-{platform}-{arch}.{ext}
|
|
41
|
-
*
|
|
42
|
-
* @param version - CouchDB version (e.g., '3', '3.5.1')
|
|
43
|
-
* @param platform - Platform identifier (e.g., 'darwin', 'linux', 'win32')
|
|
44
|
-
* @param arch - Architecture identifier (e.g., 'arm64', 'x64')
|
|
45
|
-
* @returns Download URL for the binary
|
|
46
|
-
*/
|
|
47
|
-
export function getBinaryUrl(
|
|
48
|
-
version: string,
|
|
49
|
-
platform: Platform,
|
|
50
|
-
arch: Arch,
|
|
51
|
-
): string {
|
|
52
|
-
const platformKey = `${platform}-${arch}`
|
|
53
|
-
const hostdbPlatform = getHostdbPlatform(platform, arch)
|
|
54
|
-
if (!hostdbPlatform) {
|
|
55
|
-
const supported = Array.from(SUPPORTED_PLATFORMS).join(', ')
|
|
56
|
-
throw new Error(
|
|
57
|
-
`Unsupported platform: ${platformKey}. Supported platforms: ${supported}`,
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Normalize version (handles major version lookup and X.Y -> X.Y.Z conversion)
|
|
62
|
-
const fullVersion = normalizeVersion(version, COUCHDB_VERSION_MAP)
|
|
63
|
-
const ext = platform === Platform.Win32 ? 'zip' : 'tar.gz'
|
|
64
|
-
|
|
65
|
-
return buildHostdbUrl(Engine.CouchDB, {
|
|
66
|
-
version: fullVersion,
|
|
67
|
-
hostdbPlatform,
|
|
68
|
-
extension: ext,
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Normalize version string to X.Y.Z format
|
|
74
|
-
*
|
|
75
|
-
* @param version - Version string (e.g., '3', '3.5', '3.5.1')
|
|
76
|
-
* @param versionMap - Optional version map for major version lookup
|
|
77
|
-
* @returns Normalized version (e.g., '3.5.1')
|
|
78
|
-
*/
|
|
79
|
-
function normalizeVersion(
|
|
80
|
-
version: string,
|
|
81
|
-
versionMap: Record<string, string> = COUCHDB_VERSION_MAP,
|
|
82
|
-
): string {
|
|
83
|
-
// Check if it's an exact key in the map (handles "3", "3.5", etc.)
|
|
84
|
-
if (versionMap[version]) {
|
|
85
|
-
return versionMap[version]
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const parts = version.split('.')
|
|
89
|
-
|
|
90
|
-
// If it's already a full version (X.Y.Z), return as-is
|
|
91
|
-
if (parts.length === 3) {
|
|
92
|
-
return version
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// For two-part versions (e.g., "3.5"), first try exact two-part key, then fall back to major
|
|
96
|
-
if (parts.length === 2) {
|
|
97
|
-
const twoPart = `${parts[0]}.${parts[1]}`
|
|
98
|
-
if (versionMap[twoPart]) {
|
|
99
|
-
return versionMap[twoPart]
|
|
100
|
-
}
|
|
101
|
-
// Fall back to major version for latest patch
|
|
102
|
-
const major = parts[0]
|
|
103
|
-
const mapped = versionMap[major]
|
|
104
|
-
if (mapped) {
|
|
105
|
-
return mapped
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Unknown version format - log and return as-is
|
|
110
|
-
// This may cause download failures if the version doesn't exist in hostdb
|
|
111
|
-
logDebug(
|
|
112
|
-
`CouchDB version '${version}' not in version map, may not be available in hostdb`,
|
|
113
|
-
)
|
|
114
|
-
return version
|
|
115
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hostdb Releases Module for CouchDB
|
|
3
|
-
*
|
|
4
|
-
* Fetches CouchDB binary information from the hostdb repository at
|
|
5
|
-
* https://github.com/robertjbass/hostdb
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { createHostdbReleases } from '../../core/hostdb-releases-factory'
|
|
9
|
-
import { COUCHDB_VERSION_MAP, SUPPORTED_MAJOR_VERSIONS } from './version-maps'
|
|
10
|
-
import { couchdbBinaryManager } from './binary-manager'
|
|
11
|
-
import { Engine } from '../../types'
|
|
12
|
-
|
|
13
|
-
const hostdbReleases = createHostdbReleases({
|
|
14
|
-
engine: Engine.CouchDB,
|
|
15
|
-
displayName: 'CouchDB',
|
|
16
|
-
versionMap: COUCHDB_VERSION_MAP,
|
|
17
|
-
supportedMajorVersions: SUPPORTED_MAJOR_VERSIONS,
|
|
18
|
-
groupingStrategy: 'single-digit',
|
|
19
|
-
listInstalled: () => couchdbBinaryManager.listInstalled(),
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const fetchAvailableVersions = hostdbReleases.fetchAvailableVersions
|
|
23
|
-
export const getLatestVersion = hostdbReleases.getLatestVersion
|