@nonbot/cli 0.9.4 → 0.9.5
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.
|
@@ -7,6 +7,7 @@ import { addWorktree as defaultAddWorktree } from './worktree.js';
|
|
|
7
7
|
import { createHub as defaultCreateHub } from './hub.js';
|
|
8
8
|
import { PROVIDER_PROFILES } from '../command-builders.js';
|
|
9
9
|
import { validateRepoPath } from '../payload-validator.js';
|
|
10
|
+
import { resolveBaseBranch as defaultResolveBaseBranch } from './isolated-session.js';
|
|
10
11
|
const defaultFs = {
|
|
11
12
|
mkdirSync: (p, opts) => nodeFs.mkdirSync(p, opts),
|
|
12
13
|
writeFileSync: (p, data, opts) => nodeFs.writeFileSync(p, data, opts),
|
|
@@ -122,7 +123,8 @@ export async function launchCoordinatedSet(args) {
|
|
|
122
123
|
throw new Error('coordinated set token minting produced an empty token');
|
|
123
124
|
}
|
|
124
125
|
const sessionId = `choir_${sessionName}_${token.slice(0, 8)}`;
|
|
125
|
-
const
|
|
126
|
+
const resolveBaseBranchFn = deps.resolveBaseBranchImpl ?? defaultResolveBaseBranch;
|
|
127
|
+
const baseBranch = resolveBaseBranchFn(repoRoot);
|
|
126
128
|
const hub = createHubImpl({
|
|
127
129
|
sessionId,
|
|
128
130
|
repoRoot,
|
|
@@ -74,7 +74,7 @@ export function reconcileAndCleanup(session, deps = {}) {
|
|
|
74
74
|
if (!reconcile.blocked) {
|
|
75
75
|
for (const p of session.panes) {
|
|
76
76
|
try {
|
|
77
|
-
removeWorktreeImpl({ repoRoot: session.repoRoot, worktreePath: p.worktreePath });
|
|
77
|
+
removeWorktreeImpl({ repoRoot: session.repoRoot, worktreePath: p.worktreePath, force: true });
|
|
78
78
|
removed.push(p.worktreePath);
|
|
79
79
|
}
|
|
80
80
|
catch {
|
|
@@ -84,8 +84,9 @@ export function listWorktrees(repoRoot, spawnImpl = nodeSpawnSync) {
|
|
|
84
84
|
return entries;
|
|
85
85
|
}
|
|
86
86
|
export function removeWorktree(args) {
|
|
87
|
-
const { repoRoot, worktreePath, spawnImpl = nodeSpawnSync } = args;
|
|
88
|
-
const
|
|
87
|
+
const { repoRoot, worktreePath, spawnImpl = nodeSpawnSync, force = false } = args;
|
|
88
|
+
const flags = force ? ['--force'] : [];
|
|
89
|
+
const r = runGit(spawnImpl, repoRoot, ['worktree', 'remove', ...flags, worktreePath]);
|
|
89
90
|
assertOk(r, 'worktree remove');
|
|
90
91
|
}
|
|
91
92
|
export function ensureChoirGitignored(repoRoot, fsImpl = defaultFs) {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.9.
|
|
1
|
+
export const VERSION = '0.9.5';
|
package/package.json
CHANGED