@ghl-ai/aw 0.1.36-beta.21 → 0.1.36-beta.23
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/commands/pull.mjs +14 -7
- package/constants.mjs +1 -1
- package/package.json +1 -1
package/commands/pull.mjs
CHANGED
|
@@ -80,9 +80,13 @@ export async function pullCommand(args) {
|
|
|
80
80
|
rebaseOntoOriginMain(localAw);
|
|
81
81
|
if (!silent) log.logStep('Local branch rebased onto latest');
|
|
82
82
|
} catch (e) {
|
|
83
|
-
// Check if the failure was due to merge conflicts
|
|
84
83
|
const isConflict = e.message?.includes('could not apply') || e.message?.includes('CONFLICT');
|
|
85
|
-
|
|
84
|
+
const isAlreadyInProgress = e.message?.includes('rebase-merge') || e.message?.includes('rebase-apply') || e.message?.includes('already in progress');
|
|
85
|
+
|
|
86
|
+
if (isAlreadyInProgress) {
|
|
87
|
+
// A previous conflict is still unresolved — leave it alone, user is working on it
|
|
88
|
+
if (!silent) log.logWarn('Rebase paused — resolve conflicts in your IDE, then run `aw pull` again.');
|
|
89
|
+
} else if (isConflict) {
|
|
86
90
|
// Get list of conflicted files
|
|
87
91
|
let conflictedFiles = [];
|
|
88
92
|
try {
|
|
@@ -92,12 +96,15 @@ export async function pullCommand(args) {
|
|
|
92
96
|
conflictedFiles = out.trim().split('\n').filter(Boolean);
|
|
93
97
|
} catch { /* best effort */ }
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
+
if (silent) {
|
|
100
|
+
// Silent mode: do NOT abort — leave conflict markers in files so IDE shows them visually
|
|
101
|
+
// The user will see the conflict markers in their editor and can resolve from there
|
|
102
|
+
} else {
|
|
103
|
+
// Interactive mode: abort and show clear terminal warning
|
|
104
|
+
try {
|
|
105
|
+
execSync(`git -C "${localAw}" rebase --abort`, { stdio: 'pipe' });
|
|
106
|
+
} catch { /* best effort */ }
|
|
99
107
|
|
|
100
|
-
if (!silent) {
|
|
101
108
|
log.logWarn('Merge conflict detected — rebase aborted, your branch is unchanged.');
|
|
102
109
|
if (conflictedFiles.length > 0) {
|
|
103
110
|
log.logWarn(`Conflicting file${conflictedFiles.length > 1 ? 's' : ''}:`);
|
package/constants.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { homedir } from 'node:os';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
|
|
6
6
|
/** Base branch for PRs and sync checkout */
|
|
7
|
-
export const REGISTRY_BASE_BRANCH = '
|
|
7
|
+
export const REGISTRY_BASE_BRANCH = 'test-conflict-detection';
|
|
8
8
|
|
|
9
9
|
/** Default registry repository */
|
|
10
10
|
export const REGISTRY_REPO = 'GoHighLevel/platform-docs';
|