@lovelybunch/api 1.0.69-alpha.10 → 1.0.69-alpha.12

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/dist/lib/git.js CHANGED
@@ -134,7 +134,32 @@ export async function mergeBranch(branchName, strategy = 'merge') {
134
134
  }
135
135
  // --- Push / Pull ---
136
136
  export async function pushCurrent() {
137
+ // Ensure GitHub token is in credential helper before pushing
138
+ try {
139
+ const tokenRecord = await readGithubToken();
140
+ if (tokenRecord && isGithubTokenValid(tokenRecord)) {
141
+ console.log('[git] Found valid GitHub token, ensuring it\'s in credential helper');
142
+ // Ensure token is stored in credential helper
143
+ try {
144
+ await storeCredentials('x-access-token', tokenRecord.token);
145
+ console.log('[git] Successfully stored token in credential helper');
146
+ }
147
+ catch (credError) {
148
+ // Log but don't fail - credential helper might already have it
149
+ console.error('[git] Failed to store token in credential helper:', credError?.message);
150
+ }
151
+ }
152
+ else {
153
+ console.log('[git] No valid GitHub token found');
154
+ }
155
+ }
156
+ catch (tokenError) {
157
+ // Log but don't fail - might not be using GitHub auth
158
+ console.error('[git] Error reading GitHub token:', tokenError);
159
+ }
160
+ console.log('[git] Executing git push...');
137
161
  const { stdout } = await runGit(['push'], { timeout: 30000 }); // 30 second timeout for push
162
+ console.log('[git] Push completed successfully');
138
163
  return stdout;
139
164
  }
140
165
  export async function pullCurrent(strategy = 'rebase') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovelybunch/api",
3
- "version": "1.0.69-alpha.10",
3
+ "version": "1.0.69-alpha.12",
4
4
  "type": "module",
5
5
  "main": "dist/server-with-static.js",
6
6
  "exports": {
@@ -36,9 +36,9 @@
36
36
  "dependencies": {
37
37
  "@hono/node-server": "^1.13.7",
38
38
  "@hono/node-ws": "^1.0.6",
39
- "@lovelybunch/core": "^1.0.69-alpha.10",
40
- "@lovelybunch/mcp": "^1.0.69-alpha.10",
41
- "@lovelybunch/types": "^1.0.69-alpha.10",
39
+ "@lovelybunch/core": "^1.0.69-alpha.12",
40
+ "@lovelybunch/mcp": "^1.0.69-alpha.12",
41
+ "@lovelybunch/types": "^1.0.69-alpha.12",
42
42
  "arctic": "^1.9.2",
43
43
  "bcrypt": "^5.1.1",
44
44
  "cookie": "^0.6.0",