openrune 0.5.3 → 0.6.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 +1 -1
- package/bin/rune.js +7 -11
- package/package.json +1 -1
- package/renderer/vite.config.ts +1 -1
- package/src/main.ts +6 -2
package/README.md
CHANGED
package/bin/rune.js
CHANGED
|
@@ -5,17 +5,13 @@ const path = require('path')
|
|
|
5
5
|
const fs = require('fs')
|
|
6
6
|
const os = require('os')
|
|
7
7
|
|
|
8
|
-
// Platform check
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
console.error(' Windows and Linux support is coming soon.')
|
|
12
|
-
console.error(' Follow https://github.com/gilhyun/Rune for updates.\n')
|
|
13
|
-
process.exit(1)
|
|
14
|
-
}
|
|
8
|
+
// Platform check
|
|
9
|
+
const IS_MAC = process.platform === 'darwin'
|
|
10
|
+
const IS_WIN = process.platform === 'win32'
|
|
15
11
|
|
|
16
12
|
const RUNE_HOME = path.join(os.homedir(), '.rune')
|
|
17
13
|
const APP_DIR = path.join(RUNE_HOME, 'app')
|
|
18
|
-
const QUICK_ACTION_DIR = path.join(os.homedir(), 'Library', 'Services')
|
|
14
|
+
const QUICK_ACTION_DIR = IS_MAC ? path.join(os.homedir(), 'Library', 'Services') : null
|
|
19
15
|
|
|
20
16
|
const [,, command, ...args] = process.argv
|
|
21
17
|
|
|
@@ -71,12 +67,12 @@ function install() {
|
|
|
71
67
|
console.log(` ✅ App built at ${projectRoot}`)
|
|
72
68
|
|
|
73
69
|
// 3. Install macOS Quick Action for right-click menu
|
|
74
|
-
if (
|
|
70
|
+
if (IS_MAC) {
|
|
75
71
|
installQuickAction(projectRoot)
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
// 4. Register .rune file association (macOS)
|
|
79
|
-
if (
|
|
75
|
+
if (IS_MAC) {
|
|
80
76
|
registerFileAssociation(projectRoot)
|
|
81
77
|
}
|
|
82
78
|
|
|
@@ -1403,7 +1399,7 @@ function uninstall() {
|
|
|
1403
1399
|
}
|
|
1404
1400
|
|
|
1405
1401
|
// Unregister from Launch Services
|
|
1406
|
-
if (
|
|
1402
|
+
if (IS_MAC) {
|
|
1407
1403
|
try {
|
|
1408
1404
|
execSync(`/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -u "${appDir}"`, { stdio: 'ignore' })
|
|
1409
1405
|
} catch {}
|
package/package.json
CHANGED
package/renderer/vite.config.ts
CHANGED
package/src/main.ts
CHANGED
|
@@ -255,8 +255,12 @@ function startRetryPolling(port: number) {
|
|
|
255
255
|
|
|
256
256
|
// ── .mcp.json Writer ─────────────────────────────────
|
|
257
257
|
function findNodePath(): string {
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
const cmd = process.platform === 'win32' ? 'where node' : 'which node'
|
|
259
|
+
try { return execSync(cmd, { encoding: 'utf-8' }).trim().split('\n')[0] } catch {}
|
|
260
|
+
const candidates = process.platform === 'win32'
|
|
261
|
+
? ['C:\\Program Files\\nodejs\\node.exe']
|
|
262
|
+
: ['/usr/local/bin/node', '/opt/homebrew/bin/node']
|
|
263
|
+
for (const p of candidates) {
|
|
260
264
|
if (fs.existsSync(p)) return p
|
|
261
265
|
}
|
|
262
266
|
return 'node'
|