claude-code-backup 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-backup",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Backup and auto-sync Claude Code memory, settings, and CLAUDE.md files to a private GitHub repo — with real-time file watching and macOS launchd auto-start",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,11 +15,12 @@ function remoteUrl(config) {
15
15
  if (config.auth_method === 'ssh') {
16
16
  return `git@github.com:${config.github.repo}.git`;
17
17
  }
18
- // Legacy or explicit PAT auth: embed token in URL
19
- if (config.github?.pat) {
20
- return `https://${config.github.pat}@github.com/${config.github.repo}.git`;
18
+ // Explicit PAT auth: embed as x-access-token:<PAT> (correct GitHub OAuth format,
19
+ // no credential prompt needed so it works in non-TTY/background service contexts)
20
+ if (config.auth_method === 'pat' && config.github?.pat) {
21
+ return `https://x-access-token:${config.github.pat}@github.com/${config.github.repo}.git`;
21
22
  }
22
- // System auth (osxkeychain, gh CLI, etc.) credential helper handles it
23
+ // System auth or legacy config: bare URL, credential helper (osxkeychain/gh) handles it
23
24
  return `https://github.com/${config.github.repo}.git`;
24
25
  }
25
26
 
@@ -45,7 +46,9 @@ async function getApiToken(config) {
45
46
  }
46
47
 
47
48
  function repoGit() {
48
- return simpleGit(REPO_DIR);
49
+ return simpleGit(REPO_DIR, {
50
+ config: [],
51
+ }).env({ ...process.env, GIT_TERMINAL_PROMPT: '0' });
49
52
  }
50
53
 
51
54
  async function configureGit(g) {