spindb 0.4.1 → 0.5.3

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.
Files changed (44) hide show
  1. package/README.md +207 -101
  2. package/cli/commands/clone.ts +3 -1
  3. package/cli/commands/connect.ts +54 -24
  4. package/cli/commands/create.ts +309 -189
  5. package/cli/commands/delete.ts +3 -1
  6. package/cli/commands/deps.ts +19 -4
  7. package/cli/commands/edit.ts +245 -0
  8. package/cli/commands/engines.ts +434 -0
  9. package/cli/commands/info.ts +279 -0
  10. package/cli/commands/list.ts +14 -3
  11. package/cli/commands/menu.ts +510 -198
  12. package/cli/commands/restore.ts +66 -43
  13. package/cli/commands/start.ts +50 -19
  14. package/cli/commands/stop.ts +3 -1
  15. package/cli/commands/url.ts +79 -0
  16. package/cli/index.ts +9 -3
  17. package/cli/ui/prompts.ts +99 -34
  18. package/config/defaults.ts +40 -15
  19. package/config/engine-defaults.ts +107 -0
  20. package/config/os-dependencies.ts +119 -124
  21. package/config/paths.ts +82 -56
  22. package/core/binary-manager.ts +44 -6
  23. package/core/config-manager.ts +17 -5
  24. package/core/container-manager.ts +124 -60
  25. package/core/dependency-manager.ts +9 -15
  26. package/core/error-handler.ts +336 -0
  27. package/core/platform-service.ts +634 -0
  28. package/core/port-manager.ts +51 -32
  29. package/core/process-manager.ts +26 -8
  30. package/core/start-with-retry.ts +167 -0
  31. package/core/transaction-manager.ts +170 -0
  32. package/engines/index.ts +7 -2
  33. package/engines/mysql/binary-detection.ts +325 -0
  34. package/engines/mysql/index.ts +808 -0
  35. package/engines/mysql/restore.ts +257 -0
  36. package/engines/mysql/version-validator.ts +373 -0
  37. package/{core/postgres-binary-manager.ts → engines/postgresql/binary-manager.ts} +63 -23
  38. package/engines/postgresql/binary-urls.ts +5 -3
  39. package/engines/postgresql/index.ts +17 -9
  40. package/engines/postgresql/restore.ts +54 -5
  41. package/engines/postgresql/version-validator.ts +262 -0
  42. package/package.json +9 -3
  43. package/types/index.ts +29 -5
  44. package/cli/commands/postgres-tools.ts +0 -216
@@ -3,6 +3,14 @@ import chalk from 'chalk'
3
3
  import { containerManager } from '../../core/container-manager'
4
4
  import { info, error } from '../ui/theme'
5
5
 
6
+ /**
7
+ * Engine icons for display
8
+ */
9
+ const engineIcons: Record<string, string> = {
10
+ postgresql: '🐘',
11
+ mysql: '🐬',
12
+ }
13
+
6
14
  export const listCommand = new Command('list')
7
15
  .alias('ls')
8
16
  .description('List all containers')
@@ -26,12 +34,12 @@ export const listCommand = new Command('list')
26
34
  console.log(
27
35
  chalk.gray(' ') +
28
36
  chalk.bold.white('NAME'.padEnd(20)) +
29
- chalk.bold.white('ENGINE'.padEnd(12)) +
37
+ chalk.bold.white('ENGINE'.padEnd(15)) +
30
38
  chalk.bold.white('VERSION'.padEnd(10)) +
31
39
  chalk.bold.white('PORT'.padEnd(8)) +
32
40
  chalk.bold.white('STATUS'),
33
41
  )
34
- console.log(chalk.gray(' ' + '─'.repeat(60)))
42
+ console.log(chalk.gray(' ' + '─'.repeat(63)))
35
43
 
36
44
  // Table rows
37
45
  for (const container of containers) {
@@ -40,10 +48,13 @@ export const listCommand = new Command('list')
40
48
  ? chalk.green('● running')
41
49
  : chalk.gray('○ stopped')
42
50
 
51
+ const engineIcon = engineIcons[container.engine] || '🗄️'
52
+ const engineDisplay = `${engineIcon} ${container.engine}`
53
+
43
54
  console.log(
44
55
  chalk.gray(' ') +
45
56
  chalk.cyan(container.name.padEnd(20)) +
46
- chalk.white(container.engine.padEnd(12)) +
57
+ chalk.white(engineDisplay.padEnd(14)) +
47
58
  chalk.yellow(container.version.padEnd(10)) +
48
59
  chalk.green(String(container.port).padEnd(8)) +
49
60
  statusDisplay,