@staff0rd/assist 0.1209.7 → 0.1209.8
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/.build-files +34 -35
- package/dist/built-version +1 -1
- package/dist/{chunk-N4HYQKDE.js → chunk-3B3TZFFZ.js} +1 -1
- package/dist/{chunk-OJB7NJRI.js → chunk-4VJXZMG4.js} +1 -1
- package/dist/{chunk-LO6MUDSE.js → chunk-5FZEIJNQ.js} +1 -1
- package/dist/{chunk-BCXWSOB3.js → chunk-5XORAPRE.js} +1 -1
- package/dist/{chunk-MUHZ22VQ.js → chunk-7VTFCHIT.js} +1 -1
- package/dist/{chunk-2DMKXYGN.js → chunk-CGTWGF4R.js} +1 -1
- package/dist/{chunk-B5MQGARY.js → chunk-DOIDAWFX.js} +5 -5
- package/dist/{chunk-76IN2RPB.js → chunk-GCVGBOX5.js} +7 -25
- package/dist/{chunk-3MZSXH2X.js → chunk-ITQOKBXS.js} +1 -1
- package/dist/{chunk-2JSJQPC3.js → chunk-LCEKIRDI.js} +2 -2
- package/dist/{chunk-3T5UPJSQ.js → chunk-NBA3Z4TA.js} +1 -1
- package/dist/{chunk-GXXGMQTW.js → chunk-NEC6OVBH.js} +3 -3
- package/dist/{chunk-HHHJ6PEO.js → chunk-QK6LOFXI.js} +88 -14
- package/dist/{chunk-QAJUCN3A.js → chunk-UOYZCIWZ.js} +20 -1
- package/dist/{chunk-FYYZG4GY.js → chunk-YR3NOIK4.js} +20 -4
- package/dist/{chunk-ZWLBKWOG.js → chunk-ZZPDMUIS.js} +1 -1
- package/dist/commands/sessions/web/bundle.js +4 -4
- package/dist/{doctorNodes-75P5VYFP.js → doctorNodes-KRVVGZ3H.js} +3 -3
- package/dist/{fixConflict-X4D2GILF.js → fixConflict-SHPVWNCI.js} +6 -7
- package/dist/index.js +23 -23
- package/dist/{launchMode-THX4GZUV.js → launchMode-E6C56QJ5.js} +6 -7
- package/dist/{next-TXZCR5SM.js → next-RU4CE65F.js} +5 -6
- package/dist/{pullIfConfigured-OZ5OPCR2.js → pullIfConfigured-2IBMXTYT.js} +2 -3
- package/dist/{refine-WFX7XY5B.js → refine-PM727EVL.js} +7 -8
- package/dist/{restartNode-7NLISQB4.js → restartNode-KLNVUHES.js} +5 -5
- package/dist/{review-PZWEAYOB.js → review-63J2YROM.js} +5 -6
- package/dist/{reviewPrComments-VT3QPSKM.js → reviewPrComments-BOOP6SKN.js} +6 -7
- package/dist/{run-4SMOXOIS.js → run-T4LRCNGP.js} +2 -2
- package/dist/{run-TCKC6JKH.js → run-XKK6RIXT.js} +4 -5
- package/dist/{runDaemon-VNI7RMPE.js → runDaemon-5QC62HXQ.js} +11 -13
- package/dist/{runRefine-J647JFTB.js → runRefine-U5VSEHLT.js} +7 -8
- package/dist/{signExtension-ZPQBWJPM.js → signExtension-OD33BOCP.js} +1 -1
- package/dist/{updateNode-KEPO26SS.js → updateNode-XBXWVBTG.js} +5 -5
- package/dist/{web-W33FHI2A.js → web-EYVVF2JJ.js} +9 -8
- package/dist/{web-5XUS5CKZ.js → web-FQDB4QQA.js} +9 -8
- package/package.json +1 -1
- package/dist/chunk-B3JSQA5D.js +0 -25
- package/dist/{chunk-KYJAT623.js → chunk-VIKP2CPB.js} +3 -3
|
@@ -67,10 +67,29 @@ function gitSyncOrNull(cwd, args) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
// src/commands/sessions/daemon/worktree/cloneHead.ts
|
|
71
|
+
function cloneHead(clone) {
|
|
72
|
+
return gitOrNull(clone, ["symbolic-ref", "--short", "HEAD"]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/commands/sessions/daemon/worktree/remoteDefaultBranch.ts
|
|
76
|
+
async function remoteDefaultBranch(clone) {
|
|
77
|
+
const head = await gitOrNull(clone, [
|
|
78
|
+
"symbolic-ref",
|
|
79
|
+
"--short",
|
|
80
|
+
"refs/remotes/origin/HEAD"
|
|
81
|
+
]);
|
|
82
|
+
if (!head) return await cloneHead(clone) ?? "main";
|
|
83
|
+
const slash = head.indexOf("/");
|
|
84
|
+
return slash === -1 ? head : head.slice(slash + 1);
|
|
85
|
+
}
|
|
86
|
+
|
|
70
87
|
export {
|
|
71
88
|
git,
|
|
72
89
|
gitOrNull,
|
|
73
90
|
gitResult,
|
|
74
91
|
gitSyncResult,
|
|
75
|
-
gitSyncOrNull
|
|
92
|
+
gitSyncOrNull,
|
|
93
|
+
cloneHead,
|
|
94
|
+
remoteDefaultBranch
|
|
76
95
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
cloneHead,
|
|
3
|
+
gitOrNull,
|
|
4
|
+
gitSyncOrNull,
|
|
5
|
+
remoteDefaultBranch
|
|
6
|
+
} from "./chunk-UOYZCIWZ.js";
|
|
4
7
|
|
|
5
8
|
// src/commands/sessions/daemon/worktree/listWorktreePaths.ts
|
|
6
9
|
function listWorktreePaths(cwd) {
|
|
@@ -27,6 +30,18 @@ function gitCommonDir(cwd) {
|
|
|
27
30
|
]);
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
// src/commands/sessions/daemon/worktree/worktreeStartPoint.ts
|
|
34
|
+
async function worktreeStartPoint(clone, trunk) {
|
|
35
|
+
const branch = trunk ? await cloneTrunkBranch(clone) : await remoteDefaultBranch(clone);
|
|
36
|
+
const ref = `origin/${branch}`;
|
|
37
|
+
if (await gitOrNull(clone, ["rev-parse", "--verify", "--quiet", ref]))
|
|
38
|
+
return { ref, track: trunk };
|
|
39
|
+
return { ref: "HEAD", track: false };
|
|
40
|
+
}
|
|
41
|
+
async function cloneTrunkBranch(clone) {
|
|
42
|
+
return await cloneHead(clone) ?? remoteDefaultBranch(clone);
|
|
43
|
+
}
|
|
44
|
+
|
|
30
45
|
// src/commands/sessions/daemon/worktree/canonicalTreePath.ts
|
|
31
46
|
import { realpathSync } from "fs";
|
|
32
47
|
import { resolve } from "path";
|
|
@@ -39,9 +54,10 @@ function canonicalTreePath(path) {
|
|
|
39
54
|
}
|
|
40
55
|
|
|
41
56
|
export {
|
|
42
|
-
canonicalTreePath,
|
|
43
57
|
listWorktreePaths,
|
|
44
58
|
mainWorktree,
|
|
45
59
|
listLocalBranches,
|
|
46
|
-
gitCommonDir
|
|
60
|
+
gitCommonDir,
|
|
61
|
+
worktreeStartPoint,
|
|
62
|
+
canonicalTreePath
|
|
47
63
|
};
|