spindb 0.9.3 → 0.10.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.
@@ -18,6 +18,7 @@ import { tmpdir } from 'os'
18
18
  import { BaseEngine } from '../base-engine'
19
19
  import { sqliteRegistry } from './registry'
20
20
  import { configManager } from '../../core/config-manager'
21
+ import { platformService } from '../../core/platform-service'
21
22
  import { getEngineDefaults } from '../../config/engine-defaults'
22
23
  import type {
23
24
  ContainerConfig,
@@ -46,7 +47,8 @@ export class SQLiteEngine extends BaseEngine {
46
47
  throw new Error(
47
48
  'SQLite uses system-installed binaries. Install sqlite3:\n' +
48
49
  ' macOS: brew install sqlite (or use built-in /usr/bin/sqlite3)\n' +
49
- ' Ubuntu/Debian: sudo apt install sqlite3',
50
+ ' Ubuntu/Debian: sudo apt install sqlite3\n' +
51
+ ' Windows: choco install sqlite or winget install SQLite.SQLite',
50
52
  )
51
53
  }
52
54
 
@@ -79,7 +81,8 @@ export class SQLiteEngine extends BaseEngine {
79
81
  'sqlite3 not found. Install SQLite:\n' +
80
82
  ' macOS: brew install sqlite (or use built-in /usr/bin/sqlite3)\n' +
81
83
  ' Ubuntu/Debian: sudo apt install sqlite3\n' +
82
- ' Fedora: sudo dnf install sqlite',
84
+ ' Fedora: sudo dnf install sqlite\n' +
85
+ ' Windows: choco install sqlite or winget install SQLite.SQLite',
83
86
  )
84
87
  }
85
88
  return sqlite3Path
@@ -96,15 +99,8 @@ export class SQLiteEngine extends BaseEngine {
96
99
  return configPath
97
100
  }
98
101
 
99
- // Check system PATH
100
- try {
101
- // TODO - update when windows support is added
102
- const { stdout } = await execFileAsync('which', ['sqlite3'])
103
- const path = stdout.trim()
104
- return path || null
105
- } catch {
106
- return null
107
- }
102
+ // Check system PATH using platform service (works on Windows, macOS, Linux)
103
+ return platformService.findToolPath('sqlite3')
108
104
  }
109
105
 
110
106
  /**
@@ -117,14 +113,8 @@ export class SQLiteEngine extends BaseEngine {
117
113
  return configPath
118
114
  }
119
115
 
120
- // Check system PATH
121
- try {
122
- const { stdout } = await execFileAsync('which', ['litecli'])
123
- const path = stdout.trim()
124
- return path || null
125
- } catch {
126
- return null
127
- }
116
+ // Check system PATH using platform service (works on Windows, macOS, Linux)
117
+ return platformService.findToolPath('litecli')
128
118
  }
129
119
 
130
120
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spindb",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "Spin up local database containers without Docker. A DBngin-like CLI for PostgreSQL and MySQL.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -50,12 +50,14 @@
50
50
  "commander": "^12.1.0",
51
51
  "inquirer": "^9.3.7",
52
52
  "ora": "^8.1.1",
53
- "tsx": "^4.7.0"
53
+ "tsx": "^4.7.0",
54
+ "unzipper": "^0.12.3"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@eslint/js": "^9.39.1",
57
58
  "@types/inquirer": "^9.0.7",
58
59
  "@types/node": "^20.10.0",
60
+ "@types/unzipper": "^0.10.11",
59
61
  "eslint": "^9.39.1",
60
62
  "husky": "^9.1.7",
61
63
  "prettier": "^3.6.2",