@jxtools/visualgit 1.1.0 → 1.2.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/README.md +6 -0
- package/bin/cli.js +9 -2
- package/dist/assets/index-CfMbMqji.js +13 -0
- package/dist/index.html +1 -1
- package/dist-server/index.js +6 -6
- package/dist-server/routes/ai.js +2 -2
- package/dist-server/services/ai.service.js +4 -4
- package/package.json +1 -1
- package/dist/assets/index-BZU2xrvr.js +0 -13
package/README.md
CHANGED
|
@@ -25,6 +25,12 @@ This opens a browser window with a visual diff between your current branch and i
|
|
|
25
25
|
- AI analysis of your changes on demand (Claude or OpenAI)
|
|
26
26
|
- Resizable panels and dark terminal-style UI
|
|
27
27
|
|
|
28
|
+
## Update
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm update -g @jxtools/visualgit
|
|
32
|
+
```
|
|
33
|
+
|
|
28
34
|
## Requirements
|
|
29
35
|
|
|
30
36
|
- Node.js 18+
|
package/bin/cli.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync } from 'fs'
|
|
3
|
+
import { existsSync, readFileSync } from 'fs'
|
|
4
4
|
import { resolve, dirname } from 'path'
|
|
5
5
|
import { fileURLToPath } from 'url'
|
|
6
6
|
import { spawn } from 'child_process'
|
|
7
7
|
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
|
|
10
|
+
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
11
|
+
const pkg = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8'))
|
|
12
|
+
console.log(`visualgit v${pkg.version}`)
|
|
13
|
+
process.exit(0)
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
const repoPath = process.cwd()
|
|
9
17
|
const isGitRepo = existsSync(resolve(repoPath, '.git'))
|
|
10
18
|
|
|
11
19
|
async function main() {
|
|
12
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
13
20
|
const serverPath = resolve(__dirname, '..', 'dist-server', 'index.js')
|
|
14
21
|
|
|
15
22
|
if (!existsSync(serverPath)) {
|