gitdone-agent 0.1.0 → 0.1.1

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 (2) hide show
  1. package/index.js +6 -6
  2. package/package.json +15 -15
package/index.js CHANGED
@@ -46,14 +46,14 @@ function getStartupDir() {
46
46
  return join(homedir(), 'AppData', 'Roaming', 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup')
47
47
  }
48
48
 
49
- function getBunPath() {
50
- try { return execSync('where bun', { encoding: 'utf8' }).trim().split('\n')[0].trim() } catch {}
51
- try { return execSync('which bun', { encoding: 'utf8' }).trim() } catch {}
52
- return 'bun'
49
+ function getNodePath() {
50
+ try { return execSync('where node', { encoding: 'utf8' }).trim().split('\n')[0].trim() } catch {}
51
+ try { return execSync('which node', { encoding: 'utf8' }).trim() } catch {}
52
+ return process.execPath
53
53
  }
54
54
 
55
55
  function installStartup({ name, key, path: repoPath, url, interval, projectId }) {
56
- const bunPath = getBunPath()
56
+ const nodePath = getNodePath()
57
57
  const agentPath = resolve(process.argv[1])
58
58
  const startupDir = getStartupDir()
59
59
 
@@ -69,7 +69,7 @@ function installStartup({ name, key, path: repoPath, url, interval, projectId })
69
69
  // VBScript runs the agent silently — no console window pops up on login
70
70
  const vbs = [
71
71
  'Set WshShell = CreateObject("WScript.Shell")',
72
- `WshShell.Run """${bunPath}"" ""${agentPath}"" ${argLine}", 0, False`,
72
+ `WshShell.Run """${nodePath}"" ""${agentPath}"" ${argLine}", 0, False`,
73
73
  ].join('\r\n')
74
74
 
75
75
  const vbsPath = join(startupDir, `gitdone-${name}.vbs`)
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
- {
2
- "name": "gitdone-agent",
3
- "version": "0.1.0",
4
- "description": "Local git agent for gitdone watches a local repo and sends snapshots to gitdone.eu",
5
- "type": "module",
6
- "bin": {
7
- "gitdone-agent": "index.js"
8
- },
9
- "scripts": {
10
- "start": "node index.js"
11
- },
12
- "engines": {
13
- "node": ">=18"
14
- }
15
- }
1
+ {
2
+ "name": "gitdone-agent",
3
+ "version": "0.1.1",
4
+ "description": "Local git agent for gitdone — watches a local repo and sends snapshots to gitdone.eu",
5
+ "type": "module",
6
+ "bin": {
7
+ "gitdone-agent": "index.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node index.js"
11
+ },
12
+ "engines": {
13
+ "node": "\u003e=18"
14
+ }
15
+ }