@eldrforge/kodrdriv 1.2.27 â 1.2.29
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/AI-FRIENDLY-LOGGING-GUIDE.md +237 -0
- package/AI-LOGGING-MIGRATION-COMPLETE.md +371 -0
- package/ALREADY-PUBLISHED-PACKAGES-FIX.md +264 -0
- package/AUDIT-BRANCHES-PROGRESS-FIX.md +90 -0
- package/AUDIT-EXAMPLE-OUTPUT.md +113 -0
- package/CHECKPOINT-RECOVERY-FIX.md +450 -0
- package/LOGGING-MIGRATION-STATUS.md +186 -0
- package/PARALLEL-PUBLISH-DEBUGGING-GUIDE.md +441 -0
- package/PARALLEL-PUBLISH-FIXES-IMPLEMENTED.md +405 -0
- package/PARALLEL-PUBLISH-LOGGING-FIXES.md +274 -0
- package/PARALLEL-PUBLISH-QUICK-REFERENCE.md +375 -0
- package/PARALLEL_EXECUTION_FIX.md +2 -2
- package/PUBLISH_IMPROVEMENTS_IMPLEMENTED.md +4 -5
- package/VERSION-AUDIT-FIX.md +333 -0
- package/dist/application.js +6 -6
- package/dist/application.js.map +1 -1
- package/dist/arguments.js +43 -13
- package/dist/arguments.js.map +1 -1
- package/dist/commands/audio-commit.js +18 -18
- package/dist/commands/audio-commit.js.map +1 -1
- package/dist/commands/audio-review.js +32 -32
- package/dist/commands/audio-review.js.map +1 -1
- package/dist/commands/clean.js +9 -9
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/commit.js +20 -20
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/development.js +88 -89
- package/dist/commands/development.js.map +1 -1
- package/dist/commands/link.js +36 -36
- package/dist/commands/link.js.map +1 -1
- package/dist/commands/publish.js +318 -220
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/release.js +14 -14
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/review.js +15 -17
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/select-audio.js +5 -5
- package/dist/commands/select-audio.js.map +1 -1
- package/dist/commands/tree.js +134 -39
- package/dist/commands/tree.js.map +1 -1
- package/dist/commands/unlink.js +39 -39
- package/dist/commands/unlink.js.map +1 -1
- package/dist/commands/updates.js +150 -14
- package/dist/commands/updates.js.map +1 -1
- package/dist/commands/versions.js +14 -13
- package/dist/commands/versions.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/content/diff.js +5 -5
- package/dist/content/diff.js.map +1 -1
- package/dist/content/files.js +2 -2
- package/dist/content/files.js.map +1 -1
- package/dist/content/log.js +3 -3
- package/dist/content/log.js.map +1 -1
- package/dist/execution/CommandValidator.js +6 -6
- package/dist/execution/CommandValidator.js.map +1 -1
- package/dist/execution/DynamicTaskPool.js +129 -19
- package/dist/execution/DynamicTaskPool.js.map +1 -1
- package/dist/execution/RecoveryManager.js +99 -21
- package/dist/execution/RecoveryManager.js.map +1 -1
- package/dist/execution/TreeExecutionAdapter.js +23 -20
- package/dist/execution/TreeExecutionAdapter.js.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/util/checkpointManager.js +4 -4
- package/dist/util/checkpointManager.js.map +1 -1
- package/dist/util/dependencyGraph.js +2 -2
- package/dist/util/dependencyGraph.js.map +1 -1
- package/dist/util/fileLock.js +1 -1
- package/dist/util/fileLock.js.map +1 -1
- package/dist/util/general.js +148 -15
- package/dist/util/general.js.map +1 -1
- package/dist/util/interactive.js +2 -2
- package/dist/util/interactive.js.map +1 -1
- package/dist/util/performance.js.map +1 -1
- package/dist/util/safety.js +13 -13
- package/dist/util/safety.js.map +1 -1
- package/dist/utils/branchState.js +567 -0
- package/dist/utils/branchState.js.map +1 -0
- package/package.json +4 -4
- package/scripts/update-test-log-assertions.js +73 -0
|
@@ -9,8 +9,8 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
9
9
|
* Scans git history for X.X.X-dev.0 commits and tags them
|
|
10
10
|
*/ async function createRetroactiveTags(workingBranch, isDryRun, logger, tagPrefix = 'working/') {
|
|
11
11
|
logger.info('');
|
|
12
|
-
logger.info('
|
|
13
|
-
logger.info('
|
|
12
|
+
logger.info('DEV_TAG_SCAN_STARTING: Scanning git history for past release points | Purpose: Create retroactive tags | Pattern: X.X.X-dev.0 version bumps');
|
|
13
|
+
logger.info('DEV_TAG_SCAN_PATTERN: Looking for development version bump commits | Version Format: X.X.X-dev.0 | Purpose: Identify release points');
|
|
14
14
|
logger.info('');
|
|
15
15
|
try {
|
|
16
16
|
// Get all commits on working branch with oneline format
|
|
@@ -21,7 +21,7 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
21
21
|
// Match patterns like: "4.4.52-dev.0" or "chore: bump version to 4.4.52-dev.0"
|
|
22
22
|
return /\b\d+\.\d+\.\d+-dev\.0\b/.test(line);
|
|
23
23
|
});
|
|
24
|
-
logger.info(
|
|
24
|
+
logger.info(`DEV_TAG_COMMITS_FOUND: Found potential development version commits | Count: ${devCommits.length} | Status: Analyzing for tag creation`);
|
|
25
25
|
const tagsCreated = [];
|
|
26
26
|
const tagsSkipped = [];
|
|
27
27
|
for (const commitLine of devCommits){
|
|
@@ -47,20 +47,20 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
47
47
|
await run(`git tag ${workingTagName} ${sha}`);
|
|
48
48
|
tagsCreated.push(workingTagName);
|
|
49
49
|
} else {
|
|
50
|
-
logger.info(`
|
|
50
|
+
logger.info(`DEV_TAG_DRY_RUN: Would create retroactive tag | Mode: dry-run | Tag: ${workingTagName} | Commit: ${sha.substring(0, 7)}`);
|
|
51
51
|
tagsCreated.push(workingTagName);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
logger.info('');
|
|
55
55
|
if (tagsCreated.length > 0 && !isDryRun) {
|
|
56
|
-
logger.info(
|
|
56
|
+
logger.info(`DEV_TAG_PUSHING: Pushing retroactive tags to remote | Count: ${tagsCreated.length} | Remote: origin | Command: git push origin --tags`);
|
|
57
57
|
await run('git push origin --tags');
|
|
58
58
|
logger.info('');
|
|
59
|
-
logger.info(
|
|
60
|
-
tagsCreated.forEach((tag)=>logger.info(`
|
|
59
|
+
logger.info(`DEV_TAG_PUSH_SUCCESS: Successfully created and pushed retroactive tags | Count: ${tagsCreated.length} | Remote: origin | Status: completed`);
|
|
60
|
+
tagsCreated.forEach((tag)=>logger.info(`DEV_TAG_CREATED: Retroactive tag created | Tag: ${tag} | Status: pushed`));
|
|
61
61
|
} else if (tagsCreated.length > 0 && isDryRun) {
|
|
62
|
-
logger.info(`Would create and push ${tagsCreated.length}
|
|
63
|
-
tagsCreated.forEach((tag)=>logger.info(`
|
|
62
|
+
logger.info(`DEV_TAG_DRY_RUN_SUMMARY: Would create and push retroactive tags | Mode: dry-run | Count: ${tagsCreated.length}`);
|
|
63
|
+
tagsCreated.forEach((tag)=>logger.info(`DEV_TAG_DRY_RUN_TAG: Would create tag | Tag: ${tag} | Mode: dry-run`));
|
|
64
64
|
}
|
|
65
65
|
if (tagsSkipped.length > 0) {
|
|
66
66
|
logger.verbose('');
|
|
@@ -68,12 +68,12 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
68
68
|
tagsSkipped.forEach((tag)=>logger.verbose(` - ${tag}`));
|
|
69
69
|
}
|
|
70
70
|
if (tagsCreated.length === 0 && tagsSkipped.length === 0) {
|
|
71
|
-
logger.info('
|
|
71
|
+
logger.info('DEV_TAG_NO_COMMITS: No development version commits found in history | Pattern: X.X.X-dev.0 | Status: Nothing to tag | Action: No retroactive tags created');
|
|
72
72
|
}
|
|
73
73
|
logger.info('');
|
|
74
74
|
} catch (error) {
|
|
75
|
-
logger.warn(
|
|
76
|
-
logger.warn('
|
|
75
|
+
logger.warn(`DEV_TAG_CREATION_FAILED: Unable to create retroactive tags | Error: ${error.message} | Impact: Past releases not tagged | Alternative: Manual tagging available`);
|
|
76
|
+
logger.warn('DEV_TAG_MANUAL_OPTION: Manual tagging option available | Action: Use git tag manually for past releases | Purpose: Tag historical releases');
|
|
77
77
|
// Don't throw - retroactive tagging is optional
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -82,24 +82,24 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
82
82
|
*/ const execute = async (runConfig)=>{
|
|
83
83
|
const isDryRun = runConfig.dryRun || false;
|
|
84
84
|
const logger = getDryRunLogger(isDryRun);
|
|
85
|
-
logger.info('
|
|
85
|
+
logger.info('DEV_BRANCH_NAVIGATION: Navigating to working branch for development | Purpose: Start development cycle | Next: Version bump and sync');
|
|
86
86
|
try {
|
|
87
87
|
var _runConfig_development, _runConfig_development1, _runConfig_development2;
|
|
88
88
|
// Get current branch
|
|
89
89
|
const currentBranch = isDryRun ? 'mock-branch' : await getCurrentBranch();
|
|
90
|
-
logger.info(
|
|
90
|
+
logger.info(`DEV_CURRENT_BRANCH: Current branch identified | Branch: ${currentBranch} | Action: Determine working branch`);
|
|
91
91
|
// Find the working/development branch from configuration
|
|
92
92
|
let workingBranch = 'working'; // Default fallback
|
|
93
93
|
if (runConfig.branches) {
|
|
94
94
|
const configuredDevBranch = findDevelopmentBranch(runConfig.branches);
|
|
95
95
|
if (configuredDevBranch) {
|
|
96
96
|
workingBranch = configuredDevBranch;
|
|
97
|
-
logger.info(
|
|
97
|
+
logger.info(`DEV_WORKING_BRANCH_CONFIGURED: Using configured working branch | Branch: ${workingBranch} | Source: config | Current: ${currentBranch}`);
|
|
98
98
|
} else {
|
|
99
|
-
logger.info(
|
|
99
|
+
logger.info(`DEV_WORKING_BRANCH_DEFAULT: No working branch configured | Branch: ${workingBranch} | Source: default | Current: ${currentBranch}`);
|
|
100
100
|
}
|
|
101
101
|
} else {
|
|
102
|
-
logger.info(
|
|
102
|
+
logger.info(`DEV_WORKING_BRANCH_NO_CONFIG: No branch configuration found | Branch: ${workingBranch} | Source: default | Current: ${currentBranch}`);
|
|
103
103
|
}
|
|
104
104
|
// Track what actions are taken to determine the appropriate return message
|
|
105
105
|
let branchCreated = false;
|
|
@@ -133,24 +133,24 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
logger.info(
|
|
137
|
-
logger.info(
|
|
136
|
+
logger.info(`DEV_VERSION_CONFIG: Development version configuration | Prerelease Tag: ${prereleaseTag} | Increment Level: ${incrementLevel}`);
|
|
137
|
+
logger.info(`DEV_VERSION_STRATEGY: Version increment strategy | Level: ${incrementLevel} | Tag: ${prereleaseTag} | Purpose: Development version management`);
|
|
138
138
|
// Step 1: Fetch latest remote information
|
|
139
139
|
if (!isDryRun) {
|
|
140
|
-
logger.info('
|
|
140
|
+
logger.info('DEV_GIT_FETCH: Fetching latest remote information | Remote: origin | Purpose: Ensure sync before branch operations');
|
|
141
141
|
try {
|
|
142
142
|
await run('git fetch origin');
|
|
143
|
-
logger.info('
|
|
143
|
+
logger.info('DEV_GIT_FETCH_SUCCESS: Successfully fetched remote information | Remote: origin | Status: up-to-date');
|
|
144
144
|
} catch (error) {
|
|
145
|
-
logger.warn(
|
|
145
|
+
logger.warn(`DEV_GIT_FETCH_FAILED: Unable to fetch remote | Remote: origin | Error: ${error.message} | Impact: May have stale branch info`);
|
|
146
146
|
}
|
|
147
147
|
} else {
|
|
148
|
-
logger.info('Would fetch latest remote information');
|
|
148
|
+
logger.info('DEV_GIT_FETCH_DRY_RUN: Would fetch latest remote information | Mode: dry-run | Remote: origin');
|
|
149
149
|
}
|
|
150
150
|
// Special case: If currently on development branch, merge development into working
|
|
151
151
|
if (currentBranch === 'development') {
|
|
152
152
|
if (!isDryRun) {
|
|
153
|
-
logger.info('
|
|
153
|
+
logger.info('DEV_MERGE_STARTING: Currently on development branch, merging into working | Source: development | Target: working | Purpose: Sync branches before development');
|
|
154
154
|
await run(`git checkout ${workingBranch}`);
|
|
155
155
|
await run(`git merge development --no-ff -m "Merge development into working for continued development"`);
|
|
156
156
|
await run('npm install');
|
|
@@ -163,7 +163,7 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
163
163
|
// Stay on working branch for development (removed checkout development)
|
|
164
164
|
mergedDevelopmentIntoWorking = true;
|
|
165
165
|
} else {
|
|
166
|
-
logger.info('Would merge development into working
|
|
166
|
+
logger.info('DEV_MERGE_DRY_RUN: Would merge development into working | Mode: dry-run | Source: development | Target: working');
|
|
167
167
|
mergedDevelopmentIntoWorking = true;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -171,17 +171,17 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
171
171
|
if (!isDryRun && !mergedDevelopmentIntoWorking) {
|
|
172
172
|
const workingBranchExists = await localBranchExists(workingBranch);
|
|
173
173
|
if (!workingBranchExists) {
|
|
174
|
-
logger.info(
|
|
174
|
+
logger.info(`DEV_BRANCH_CREATING: Working branch does not exist, creating now | Branch: ${workingBranch} | Action: Create and checkout | Source: current HEAD`);
|
|
175
175
|
await run(`git checkout -b ${workingBranch}`);
|
|
176
|
-
logger.info(
|
|
176
|
+
logger.info(`DEV_BRANCH_CREATED: Successfully created and switched to branch | Branch: ${workingBranch} | Status: checked-out`);
|
|
177
177
|
branchCreated = true;
|
|
178
178
|
} else if (currentBranch !== workingBranch) {
|
|
179
|
-
logger.info(
|
|
179
|
+
logger.info(`DEV_BRANCH_SWITCHING: Switching to working branch | Branch: ${workingBranch} | Action: checkout | Previous: ${currentBranch}`);
|
|
180
180
|
await run(`git checkout ${workingBranch}`);
|
|
181
|
-
logger.info(
|
|
181
|
+
logger.info(`DEV_BRANCH_SWITCHED: Successfully switched to branch | Branch: ${workingBranch} | Status: checked-out`);
|
|
182
182
|
branchUpdated = true;
|
|
183
183
|
} else {
|
|
184
|
-
logger.info(
|
|
184
|
+
logger.info(`DEV_BRANCH_CURRENT: Already on working branch | Branch: ${workingBranch} | Status: no-switch-needed`);
|
|
185
185
|
alreadyOnBranch = true;
|
|
186
186
|
}
|
|
187
187
|
} else if (!mergedDevelopmentIntoWorking) {
|
|
@@ -194,33 +194,33 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
194
194
|
} else {
|
|
195
195
|
alreadyOnBranch = true;
|
|
196
196
|
}
|
|
197
|
-
logger.info(`Would switch to ${workingBranch}
|
|
198
|
-
logger.info(`Would sync ${workingBranch}
|
|
197
|
+
logger.info(`DEV_BRANCH_DRY_RUN: Would switch to working branch | Mode: dry-run | Branch: ${workingBranch} | Action: Create if needed`);
|
|
198
|
+
logger.info(`DEV_SYNC_DRY_RUN: Would sync branch with remote | Mode: dry-run | Branch: ${workingBranch} | Purpose: Avoid conflicts`);
|
|
199
199
|
}
|
|
200
200
|
// Step 2.1: Sync with remote working branch to avoid conflicts
|
|
201
201
|
if (!isDryRun) {
|
|
202
202
|
try {
|
|
203
|
-
logger.info(
|
|
203
|
+
logger.info(`DEV_BRANCH_SYNCING: Synchronizing working branch with remote | Branch: ${workingBranch} | Remote: origin/${workingBranch} | Purpose: Avoid conflicts`);
|
|
204
204
|
const remoteExists = await run(`git ls-remote --exit-code --heads origin ${workingBranch}`).then(()=>true).catch(()=>false);
|
|
205
205
|
if (remoteExists) {
|
|
206
206
|
// Use explicit fetch+merge instead of pull to avoid git config conflicts
|
|
207
207
|
await run(`git fetch origin ${workingBranch}`);
|
|
208
208
|
await run(`git merge origin/${workingBranch} --no-ff --no-edit`);
|
|
209
|
-
logger.info(
|
|
209
|
+
logger.info(`DEV_BRANCH_SYNCED: Successfully synchronized with remote | Branch: ${workingBranch} | Remote: origin/${workingBranch} | Status: in-sync`);
|
|
210
210
|
} else {
|
|
211
|
-
logger.info(
|
|
211
|
+
logger.info(`DEV_REMOTE_BRANCH_NOT_FOUND: No remote branch exists | Branch: ${workingBranch} | Remote: origin | Action: Will be created on first push`);
|
|
212
212
|
}
|
|
213
213
|
} catch (error) {
|
|
214
214
|
if (error.message && error.message.includes('CONFLICT')) {
|
|
215
|
-
logger.error(
|
|
216
|
-
logger.error(`
|
|
217
|
-
logger.error(` 1
|
|
218
|
-
logger.error(` 2
|
|
219
|
-
logger.error(` 3
|
|
220
|
-
logger.error(` 4
|
|
215
|
+
logger.error(`DEV_MERGE_CONFLICTS: Merge conflicts detected when syncing with remote | Branch: ${workingBranch} | Remote: origin | Status: conflicts-detected`);
|
|
216
|
+
logger.error(`DEV_CONFLICT_RESOLUTION: Manual conflict resolution required:`);
|
|
217
|
+
logger.error(` Step 1: Resolve conflicts in the files`);
|
|
218
|
+
logger.error(` Step 2: Stage resolved files | Command: git add <resolved-files>`);
|
|
219
|
+
logger.error(` Step 3: Complete merge | Command: git commit`);
|
|
220
|
+
logger.error(` Step 4: Resume development | Command: kodrdriv development`);
|
|
221
221
|
throw new Error(`Merge conflicts detected when syncing ${workingBranch} with remote. Please resolve conflicts manually.`);
|
|
222
222
|
} else {
|
|
223
|
-
logger.warn(
|
|
223
|
+
logger.warn(`DEV_SYNC_FAILED: Could not sync with remote | Branch: ${workingBranch} | Remote: origin | Error: ${error.message}`);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -232,48 +232,48 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
232
232
|
const targetBranch = allBranchConfig && ((_allBranchConfig_workingBranch = allBranchConfig[workingBranch]) === null || _allBranchConfig_workingBranch === void 0 ? void 0 : _allBranchConfig_workingBranch.targetBranch) || 'main';
|
|
233
233
|
const targetBranchExists = await localBranchExists(targetBranch);
|
|
234
234
|
if (targetBranchExists) {
|
|
235
|
-
logger.info(
|
|
235
|
+
logger.info(`DEV_TARGET_SYNC: Syncing working branch with target branch | Working: ${workingBranch} | Target: ${targetBranch} | Strategy: fast-forward`);
|
|
236
236
|
try {
|
|
237
237
|
await run(`git merge ${targetBranch} --ff-only`);
|
|
238
|
-
logger.info(
|
|
238
|
+
logger.info(`DEV_TARGET_MERGED_FF: Fast-forward merged target into working | Target: ${targetBranch} | Working: ${workingBranch} | Status: merged`);
|
|
239
239
|
} catch (error) {
|
|
240
240
|
// Fast-forward failed, might need regular merge
|
|
241
241
|
if (error.message && error.message.includes('Not possible to fast-forward')) {
|
|
242
|
-
logger.warn(
|
|
243
|
-
logger.info(`
|
|
242
|
+
logger.warn(`DEV_NO_FAST_FORWARD: Cannot fast-forward merge | Target: ${targetBranch} | Working: ${workingBranch} | Reason: Divergent history`);
|
|
243
|
+
logger.info(`DEV_REGULAR_MERGE_ATTEMPTING: Attempting regular merge | Strategy: no-ff | Purpose: Sync branches`);
|
|
244
244
|
try {
|
|
245
245
|
await run(`git merge ${targetBranch} --no-ff -m "Merge ${targetBranch} into ${workingBranch} for sync"`);
|
|
246
|
-
logger.info(
|
|
246
|
+
logger.info(`DEV_TARGET_MERGED: Merged target into working | Target: ${targetBranch} | Working: ${workingBranch} | Status: merged`);
|
|
247
247
|
// Run npm install after merge
|
|
248
|
-
logger.info('
|
|
248
|
+
logger.info('DEV_POST_MERGE_INSTALL: Running npm install after merge | Command: npm install | Purpose: Update dependencies');
|
|
249
249
|
await run('npm install');
|
|
250
250
|
// Check if npm install created changes
|
|
251
251
|
const gitStatus = await run('git status --porcelain');
|
|
252
252
|
if (gitStatus.stdout.trim()) {
|
|
253
|
-
logger.info('
|
|
253
|
+
logger.info('DEV_POST_MERGE_COMMIT: Committing changes from npm install | Files: package-lock.json | Purpose: Finalize merge');
|
|
254
254
|
await run('git add -A');
|
|
255
255
|
await run('git commit -m "chore: update package-lock.json after merge"');
|
|
256
256
|
}
|
|
257
257
|
} catch (mergeError) {
|
|
258
258
|
if (mergeError.message && mergeError.message.includes('CONFLICT')) {
|
|
259
|
-
logger.error(
|
|
260
|
-
logger.error(`
|
|
261
|
-
logger.error(` 1
|
|
262
|
-
logger.error(` 2
|
|
263
|
-
logger.error(` 3
|
|
264
|
-
logger.error(` 4
|
|
265
|
-
logger.error(` 5
|
|
259
|
+
logger.error(`DEV_MERGE_CONFLICTS: Merge conflicts detected | Target: ${targetBranch} | Working: ${workingBranch} | Status: conflicts-detected`);
|
|
260
|
+
logger.error(`DEV_CONFLICT_RESOLUTION: Manual conflict resolution required:`);
|
|
261
|
+
logger.error(` Step 1: Resolve conflicts in the files`);
|
|
262
|
+
logger.error(` Step 2: Stage resolved files | Command: git add <resolved-files>`);
|
|
263
|
+
logger.error(` Step 3: Complete merge | Command: git commit`);
|
|
264
|
+
logger.error(` Step 4: Update dependencies | Command: npm install`);
|
|
265
|
+
logger.error(` Step 5: Resume development | Command: kodrdriv development`);
|
|
266
266
|
throw new Error(`Merge conflicts detected when merging ${targetBranch} into ${workingBranch}. Please resolve conflicts manually.`);
|
|
267
267
|
} else {
|
|
268
268
|
throw mergeError;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
} else {
|
|
272
|
-
logger.warn(
|
|
272
|
+
logger.warn(`DEV_TARGET_MERGE_FAILED: Could not merge target into working | Target: ${targetBranch} | Working: ${workingBranch} | Error: ${error.message}`);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} else {
|
|
276
|
-
logger.info(
|
|
276
|
+
logger.info(`DEV_TARGET_NOT_EXISTS: Target branch does not exist | Branch: ${targetBranch} | Action: Skipping target sync | Status: no-target-branch`);
|
|
277
277
|
}
|
|
278
278
|
} else {
|
|
279
279
|
logger.info('Would sync working branch with target branch (main) if it exists');
|
|
@@ -282,45 +282,45 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
282
282
|
if (!isDryRun) {
|
|
283
283
|
const developmentBranchExists = await localBranchExists('development');
|
|
284
284
|
if (developmentBranchExists) {
|
|
285
|
-
logger.info('
|
|
285
|
+
logger.info('DEV_DEVELOPMENT_MERGE: Merging latest changes from development branch | Source: development | Target: ' + workingBranch + ' | Purpose: Sync development changes');
|
|
286
286
|
try {
|
|
287
287
|
await run(`git merge development --no-ff -m "Merge latest development changes into ${workingBranch}"`);
|
|
288
|
-
logger.info('
|
|
288
|
+
logger.info('DEV_DEVELOPMENT_MERGED: Successfully merged development changes | Source: development | Target: ' + workingBranch + ' | Status: merged');
|
|
289
289
|
// Run npm install after merge to update dependencies
|
|
290
|
-
logger.info('
|
|
290
|
+
logger.info('DEV_DEVELOPMENT_INSTALL: Running npm install after merge | Command: npm install | Purpose: Update dependencies');
|
|
291
291
|
await run('npm install');
|
|
292
292
|
// Check if npm install created any changes (e.g., package-lock.json)
|
|
293
293
|
const gitStatus = await run('git status --porcelain');
|
|
294
294
|
if (gitStatus.stdout.trim()) {
|
|
295
|
-
logger.info('
|
|
295
|
+
logger.info('DEV_POST_MERGE_COMMIT: Committing changes from npm install | Files: package-lock.json | Purpose: Finalize merge');
|
|
296
296
|
await run('git add -A');
|
|
297
297
|
await run(`git commit -m "chore: update package-lock.json after merge"`);
|
|
298
|
-
logger.info('
|
|
298
|
+
logger.info('DEV_CHANGES_COMMITTED: Changes committed successfully | Files: package-lock.json | Status: committed');
|
|
299
299
|
}
|
|
300
300
|
} catch (error) {
|
|
301
301
|
if (error.message && error.message.includes('CONFLICT')) {
|
|
302
|
-
logger.error(
|
|
303
|
-
logger.error(`
|
|
304
|
-
logger.error(` 1
|
|
305
|
-
logger.error(` 2
|
|
306
|
-
logger.error(` 3
|
|
307
|
-
logger.error(` 4
|
|
308
|
-
logger.error(` 5
|
|
302
|
+
logger.error(`DEV_DEV_MERGE_CONFLICTS: Merge conflicts detected | Source: development | Target: ${workingBranch} | Status: conflicts-detected`);
|
|
303
|
+
logger.error(`DEV_DEV_CONFLICT_RESOLUTION: Manual conflict resolution required:`);
|
|
304
|
+
logger.error(` Step 1: Resolve conflicts in the files`);
|
|
305
|
+
logger.error(` Step 2: Stage resolved files | Command: git add <resolved-files>`);
|
|
306
|
+
logger.error(` Step 3: Complete merge | Command: git commit`);
|
|
307
|
+
logger.error(` Step 4: Update dependencies | Command: npm install`);
|
|
308
|
+
logger.error(` Step 5: Bump version | Command: npm version pre${incrementLevel} --preid=${prereleaseTag}`);
|
|
309
309
|
throw new Error(`Merge conflicts detected when merging development into ${workingBranch}. Please resolve conflicts manually.`);
|
|
310
310
|
} else {
|
|
311
|
-
logger.error(
|
|
311
|
+
logger.error(`DEV_DEV_MERGE_FAILED: Failed to merge development branch | Source: development | Target: ${workingBranch} | Error: ${error.message}`);
|
|
312
312
|
throw error;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
} else if (!developmentBranchExists) {
|
|
316
|
-
logger.info('
|
|
316
|
+
logger.info('DEV_NO_DEV_BRANCH: Development branch does not exist | Branch: development | Action: Skipping merge step | Status: not-found');
|
|
317
317
|
} else {
|
|
318
|
-
logger.info('
|
|
318
|
+
logger.info('DEV_ALREADY_MERGED: Already merged from development | Reason: Was on development branch | Action: Skipping');
|
|
319
319
|
}
|
|
320
320
|
} else {
|
|
321
|
-
logger.info('Would merge
|
|
322
|
-
logger.info('Would run npm install after merge');
|
|
323
|
-
logger.info('Would commit
|
|
321
|
+
logger.info('DEV_DEV_MERGE_DRY_RUN: Would merge development if exists | Mode: dry-run | Source: development | Target: working');
|
|
322
|
+
logger.info('DEV_INSTALL_DRY_RUN: Would run npm install after merge | Mode: dry-run | Command: npm install');
|
|
323
|
+
logger.info('DEV_COMMIT_DRY_RUN: Would commit npm install changes | Mode: dry-run | Files: package-lock.json');
|
|
324
324
|
}
|
|
325
325
|
// Step 4.5: Create retroactive tags if requested (one-time operation)
|
|
326
326
|
if ((_runConfig_development1 = runConfig.development) === null || _runConfig_development1 === void 0 ? void 0 : _runConfig_development1.createRetroactiveTags) {
|
|
@@ -337,7 +337,7 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
337
337
|
const currentVersion = packageJson.version;
|
|
338
338
|
// If current version already has the dev tag, we're done
|
|
339
339
|
if (currentVersion.includes(`-${prereleaseTag}.`)) {
|
|
340
|
-
logger.info(
|
|
340
|
+
logger.info(`DEV_ALREADY_DEV_VERSION: Already on working branch with development version | Branch: ${workingBranch} | Version: ${currentVersion} | Status: no-bump-needed`);
|
|
341
341
|
return 'Already on working branch with development version';
|
|
342
342
|
}
|
|
343
343
|
} catch {
|
|
@@ -357,13 +357,13 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
357
357
|
const tagPrefix = ((_runConfig_development4 = runConfig.development) === null || _runConfig_development4 === void 0 ? void 0 : _runConfig_development4.workingTagPrefix) || 'working/';
|
|
358
358
|
const workingTagName = `${tagPrefix}v${currentVersion}`;
|
|
359
359
|
if (!isDryRun) {
|
|
360
|
-
logger.info(
|
|
360
|
+
logger.info(`DEV_TAG_RELEASE_VERSION: Current version is release version | Version: ${currentVersion} | Type: release | Action: Will tag before bump`);
|
|
361
361
|
logger.verbose(`Checking if tag ${workingTagName} exists...`);
|
|
362
362
|
// Check if tag already exists
|
|
363
363
|
const tagExistsResult = await run(`git tag -l "${workingTagName}"`);
|
|
364
364
|
const tagExists = tagExistsResult.stdout.trim() !== '';
|
|
365
365
|
if (tagExists) {
|
|
366
|
-
logger.info(
|
|
366
|
+
logger.info(`DEV_TAG_EXISTS: Tag already exists | Tag: ${workingTagName} | Action: Skipping tag creation | Status: already-tagged`);
|
|
367
367
|
} else {
|
|
368
368
|
// Create tag on current commit (working branch at release version)
|
|
369
369
|
logger.verbose(`Creating tag ${workingTagName} at current HEAD...`);
|
|
@@ -371,12 +371,11 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
371
371
|
// Push tag to remote
|
|
372
372
|
logger.verbose(`Pushing tag ${workingTagName} to origin...`);
|
|
373
373
|
await run(`git push origin ${workingTagName}`);
|
|
374
|
-
logger.info(
|
|
375
|
-
logger.info(`
|
|
376
|
-
logger.info(` kodrdriv release --from {previous-tag} --to ${workingTagName}`);
|
|
374
|
+
logger.info(`DEV_TAG_CREATED: Tagged working branch | Tag: ${workingTagName} | Version: ${currentVersion} | Status: tagged-and-pushed`);
|
|
375
|
+
logger.info(`DEV_TAG_RELEASE_NOTES_HINT: Release notes can be generated | Version: v${currentVersion} | Command: kodrdriv release --from {previous-tag} --to ${workingTagName}`);
|
|
377
376
|
}
|
|
378
377
|
} else {
|
|
379
|
-
logger.info(`Would tag working branch
|
|
378
|
+
logger.info(`DEV_TAG_DRY_RUN: Would tag working branch | Mode: dry-run | Tag: ${workingTagName} | Version: ${currentVersion}`);
|
|
380
379
|
}
|
|
381
380
|
} else if (currentVersion) {
|
|
382
381
|
logger.verbose(`Current version is ${currentVersion} (prerelease), skipping tag creation`);
|
|
@@ -385,8 +384,8 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
385
384
|
}
|
|
386
385
|
} catch (error) {
|
|
387
386
|
if (!isDryRun) {
|
|
388
|
-
logger.warn(
|
|
389
|
-
logger.warn('
|
|
387
|
+
logger.warn(`DEV_TAG_FAILED: Could not tag working branch | Error: ${error.message} | Impact: Not critical | Alternative: Manual tagging`);
|
|
388
|
+
logger.warn('DEV_TAG_MANUAL: Manual tagging option available | Action: Tag manually later | Purpose: Mark release point');
|
|
390
389
|
} else {
|
|
391
390
|
logger.info('Would tag working branch with current release version if applicable');
|
|
392
391
|
}
|
|
@@ -403,12 +402,12 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
403
402
|
'major'
|
|
404
403
|
].includes(incrementLevel)) {
|
|
405
404
|
versionCommand = `pre${incrementLevel}`;
|
|
406
|
-
logger.info(
|
|
405
|
+
logger.info(`DEV_VERSION_BUMPING: Bumping version with prerelease tag | Level: ${incrementLevel} | Tag: ${prereleaseTag} | Command: npm version`);
|
|
407
406
|
} else {
|
|
408
407
|
// Explicit version like "3.5.0"
|
|
409
408
|
const cleanVersion = incrementLevel.replace(/^v/, '');
|
|
410
409
|
versionCommand = `${cleanVersion}-${prereleaseTag}.0`;
|
|
411
|
-
logger.info(
|
|
410
|
+
logger.info(`DEV_VERSION_EXPLICIT: Setting explicit version | Version: ${versionCommand} | Type: explicit`);
|
|
412
411
|
}
|
|
413
412
|
if (!isDryRun) {
|
|
414
413
|
try {
|
|
@@ -418,7 +417,7 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
418
417
|
'major'
|
|
419
418
|
].includes(incrementLevel) ? await run(`npm version ${versionCommand} --preid=${prereleaseTag}`) : await run(`npm version ${versionCommand}`);
|
|
420
419
|
const newVersion = versionResult.stdout.trim();
|
|
421
|
-
logger.info(
|
|
420
|
+
logger.info(`DEV_VERSION_BUMPED: Version bumped successfully | New Version: ${newVersion} | Status: completed`);
|
|
422
421
|
// Return appropriate message based on what actions were taken
|
|
423
422
|
if (mergedDevelopmentIntoWorking) {
|
|
424
423
|
return 'Merged development into working and ready for development';
|
|
@@ -432,7 +431,7 @@ import { KODRDRIV_DEFAULTS } from '../constants.js';
|
|
|
432
431
|
return `Ready for development on ${workingBranch} with version ${newVersion}`;
|
|
433
432
|
}
|
|
434
433
|
} catch (error) {
|
|
435
|
-
logger.error(
|
|
434
|
+
logger.error(`DEV_VERSION_BUMP_FAILED: Failed to bump version | Error: ${error.message} | Impact: Version not updated`);
|
|
436
435
|
throw new Error(`Failed to bump ${incrementLevel} version: ${error.message}`);
|
|
437
436
|
}
|
|
438
437
|
} else {
|