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.
- package/README.md +207 -101
- package/cli/commands/clone.ts +3 -1
- package/cli/commands/connect.ts +54 -24
- package/cli/commands/create.ts +309 -189
- package/cli/commands/delete.ts +3 -1
- package/cli/commands/deps.ts +19 -4
- package/cli/commands/edit.ts +245 -0
- package/cli/commands/engines.ts +434 -0
- package/cli/commands/info.ts +279 -0
- package/cli/commands/list.ts +14 -3
- package/cli/commands/menu.ts +510 -198
- package/cli/commands/restore.ts +66 -43
- package/cli/commands/start.ts +50 -19
- package/cli/commands/stop.ts +3 -1
- package/cli/commands/url.ts +79 -0
- package/cli/index.ts +9 -3
- package/cli/ui/prompts.ts +99 -34
- package/config/defaults.ts +40 -15
- package/config/engine-defaults.ts +107 -0
- package/config/os-dependencies.ts +119 -124
- package/config/paths.ts +82 -56
- package/core/binary-manager.ts +44 -6
- package/core/config-manager.ts +17 -5
- package/core/container-manager.ts +124 -60
- package/core/dependency-manager.ts +9 -15
- package/core/error-handler.ts +336 -0
- package/core/platform-service.ts +634 -0
- package/core/port-manager.ts +51 -32
- package/core/process-manager.ts +26 -8
- package/core/start-with-retry.ts +167 -0
- package/core/transaction-manager.ts +170 -0
- package/engines/index.ts +7 -2
- package/engines/mysql/binary-detection.ts +325 -0
- package/engines/mysql/index.ts +808 -0
- package/engines/mysql/restore.ts +257 -0
- package/engines/mysql/version-validator.ts +373 -0
- package/{core/postgres-binary-manager.ts → engines/postgresql/binary-manager.ts} +63 -23
- package/engines/postgresql/binary-urls.ts +5 -3
- package/engines/postgresql/index.ts +17 -9
- package/engines/postgresql/restore.ts +54 -5
- package/engines/postgresql/version-validator.ts +262 -0
- package/package.json +9 -3
- package/types/index.ts +29 -5
- package/cli/commands/postgres-tools.ts +0 -216
package/cli/commands/list.ts
CHANGED
|
@@ -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(
|
|
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(
|
|
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(
|
|
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,
|