spindb 0.31.4 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +107 -826
- package/cli/commands/create.ts +5 -1
- package/cli/commands/engines.ts +256 -1
- package/cli/commands/menu/backup-handlers.ts +16 -0
- package/cli/commands/menu/container-handlers.ts +170 -17
- package/cli/commands/menu/engine-handlers.ts +6 -0
- package/cli/commands/menu/settings-handlers.ts +6 -0
- package/cli/commands/menu/shell-handlers.ts +74 -14
- package/cli/commands/menu/sql-handlers.ts +8 -50
- package/cli/commands/menu/validators.ts +8 -0
- package/cli/commands/users.ts +264 -0
- package/cli/constants.ts +8 -0
- package/cli/helpers.ts +140 -0
- package/cli/index.ts +2 -0
- package/cli/ui/prompts.ts +24 -20
- package/config/backup-formats.ts +28 -0
- package/config/engine-defaults.ts +26 -0
- package/config/engines-registry.ts +1 -0
- package/config/engines.json +50 -0
- package/config/engines.schema.json +6 -1
- package/core/base-binary-manager.ts +6 -1
- package/core/config-manager.ts +20 -0
- package/core/credential-manager.ts +257 -0
- package/core/dependency-manager.ts +5 -0
- package/core/docker-exporter.ts +30 -0
- package/core/error-handler.ts +19 -0
- package/engines/base-engine.ts +32 -1
- package/engines/clickhouse/index.ts +99 -3
- package/engines/cockroachdb/index.ts +69 -2
- package/engines/couchdb/index.ts +149 -1
- package/engines/ferretdb/README.md +4 -0
- package/engines/ferretdb/index.ts +342 -13
- package/engines/index.ts +8 -0
- package/engines/influxdb/README.md +180 -0
- package/engines/influxdb/api-client.ts +64 -0
- package/engines/influxdb/backup.ts +160 -0
- package/engines/influxdb/binary-manager.ts +110 -0
- package/engines/influxdb/binary-urls.ts +69 -0
- package/engines/influxdb/hostdb-releases.ts +23 -0
- package/engines/influxdb/index.ts +1227 -0
- package/engines/influxdb/restore.ts +417 -0
- package/engines/influxdb/version-maps.ts +75 -0
- package/engines/influxdb/version-validator.ts +128 -0
- package/engines/mariadb/index.ts +96 -1
- package/engines/meilisearch/index.ts +97 -1
- package/engines/mongodb/index.ts +82 -0
- package/engines/mysql/index.ts +105 -1
- package/engines/postgresql/index.ts +92 -0
- package/engines/qdrant/index.ts +107 -2
- package/engines/redis/index.ts +106 -12
- package/engines/surrealdb/index.ts +102 -2
- package/engines/typedb/backup.ts +167 -0
- package/engines/typedb/binary-manager.ts +200 -0
- package/engines/typedb/binary-urls.ts +38 -0
- package/engines/typedb/cli-utils.ts +210 -0
- package/engines/typedb/hostdb-releases.ts +118 -0
- package/engines/typedb/index.ts +1275 -0
- package/engines/typedb/restore.ts +377 -0
- package/engines/typedb/version-maps.ts +48 -0
- package/engines/typedb/version-validator.ts +127 -0
- package/engines/valkey/index.ts +70 -2
- package/package.json +4 -1
- package/types/index.ts +37 -0
package/types/index.ts
CHANGED
|
@@ -37,6 +37,8 @@ export enum Engine {
|
|
|
37
37
|
CockroachDB = 'cockroachdb',
|
|
38
38
|
SurrealDB = 'surrealdb',
|
|
39
39
|
QuestDB = 'questdb',
|
|
40
|
+
TypeDB = 'typedb',
|
|
41
|
+
InfluxDB = 'influxdb',
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
// Icon display mode for engine icons in CLI output
|
|
@@ -76,6 +78,8 @@ export const ALL_ENGINES = [
|
|
|
76
78
|
Engine.CockroachDB,
|
|
77
79
|
Engine.SurrealDB,
|
|
78
80
|
Engine.QuestDB,
|
|
81
|
+
Engine.TypeDB,
|
|
82
|
+
Engine.InfluxDB,
|
|
79
83
|
] as const
|
|
80
84
|
|
|
81
85
|
// File-based engines (no server process, data stored in user project directories)
|
|
@@ -205,6 +209,8 @@ export type CouchDBFormat = 'json'
|
|
|
205
209
|
export type CockroachDBFormat = 'sql'
|
|
206
210
|
export type SurrealDBFormat = 'surql'
|
|
207
211
|
export type QuestDBFormat = 'sql'
|
|
212
|
+
export type TypeDBFormat = 'typeql'
|
|
213
|
+
export type InfluxDBFormat = 'sql'
|
|
208
214
|
|
|
209
215
|
// Query command types
|
|
210
216
|
export type QueryResultRow = Record<string, unknown>
|
|
@@ -222,6 +228,23 @@ export type QueryOptions = {
|
|
|
222
228
|
body?: Record<string, unknown> // For REST API engines
|
|
223
229
|
}
|
|
224
230
|
|
|
231
|
+
// User management types
|
|
232
|
+
export type CreateUserOptions = {
|
|
233
|
+
username: string
|
|
234
|
+
password: string
|
|
235
|
+
database?: string
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export type UserCredentials = {
|
|
239
|
+
username: string
|
|
240
|
+
password: string
|
|
241
|
+
connectionString: string
|
|
242
|
+
engine: Engine
|
|
243
|
+
container: string
|
|
244
|
+
database?: string
|
|
245
|
+
apiKey?: string // Meilisearch, Qdrant
|
|
246
|
+
}
|
|
247
|
+
|
|
225
248
|
// Pull command types
|
|
226
249
|
export type PullOptions = {
|
|
227
250
|
database?: string // Target database (defaults to container.database)
|
|
@@ -265,6 +288,8 @@ export type BackupFormatType =
|
|
|
265
288
|
| CockroachDBFormat
|
|
266
289
|
| SurrealDBFormat
|
|
267
290
|
| QuestDBFormat
|
|
291
|
+
| TypeDBFormat
|
|
292
|
+
| InfluxDBFormat
|
|
268
293
|
|
|
269
294
|
// Mapping from Engine to its corresponding backup format type
|
|
270
295
|
type EngineFormatMap = {
|
|
@@ -284,6 +309,8 @@ type EngineFormatMap = {
|
|
|
284
309
|
[Engine.CockroachDB]: CockroachDBFormat
|
|
285
310
|
[Engine.SurrealDB]: SurrealDBFormat
|
|
286
311
|
[Engine.QuestDB]: QuestDBFormat
|
|
312
|
+
[Engine.TypeDB]: TypeDBFormat
|
|
313
|
+
[Engine.InfluxDB]: InfluxDBFormat
|
|
287
314
|
}
|
|
288
315
|
|
|
289
316
|
// Helper type to get format type for a specific engine
|
|
@@ -395,6 +422,11 @@ export type BinaryTool =
|
|
|
395
422
|
| 'surreal'
|
|
396
423
|
// QuestDB tools
|
|
397
424
|
| 'questdb'
|
|
425
|
+
// TypeDB tools
|
|
426
|
+
| 'typedb'
|
|
427
|
+
| 'typedb_console_bin'
|
|
428
|
+
// InfluxDB tools
|
|
429
|
+
| 'influxdb3'
|
|
398
430
|
// Enhanced shells (optional)
|
|
399
431
|
| 'pgcli'
|
|
400
432
|
| 'mycli'
|
|
@@ -482,6 +514,11 @@ export type SpinDBConfig = {
|
|
|
482
514
|
surreal?: BinaryConfig
|
|
483
515
|
// QuestDB tools
|
|
484
516
|
questdb?: BinaryConfig
|
|
517
|
+
// TypeDB tools
|
|
518
|
+
typedb?: BinaryConfig
|
|
519
|
+
typedb_console_bin?: BinaryConfig
|
|
520
|
+
// InfluxDB tools
|
|
521
|
+
influxdb3?: BinaryConfig
|
|
485
522
|
// Enhanced shells (optional)
|
|
486
523
|
pgcli?: BinaryConfig
|
|
487
524
|
mycli?: BinaryConfig
|