@moberg_hr/work-tree 2.6.0 → 2.6.2
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/{add-repo-VVECUDF3.js → add-repo-RICWFTP3.js} +6 -6
- package/dist/{answer-ZB45WLRZ.js → answer-7IAI4IQW.js} +4 -4
- package/dist/{attach-VSJ4LGJD.js → attach-5PEDASVQ.js} +6 -6
- package/dist/bin.js +2 -2
- package/dist/{block-IK2JJ5BZ.js → block-2FZ7DQP3.js} +5 -5
- package/dist/{broadcast-2TIITC7F.js → broadcast-NK3NQ6KB.js} +2 -2
- package/dist/{catchup-MSV2CLUE.js → catchup-3L5AQMRK.js} +7 -7
- package/dist/{chunk-U2MUU3TT.js → chunk-2HT2UH5Q.js} +2 -2
- package/dist/{chunk-BE2KPUJX.js → chunk-5BMIBSIN.js} +5 -5
- package/dist/{chunk-6SLZK5GD.js → chunk-5WH2ZFN6.js} +3 -3
- package/dist/{chunk-UL5TB4LY.js → chunk-6HBIR2I4.js} +2 -2
- package/dist/{chunk-24HYZTJV.js → chunk-6K4Q4EG7.js} +97 -4
- package/dist/chunk-6K4Q4EG7.js.map +1 -0
- package/dist/{chunk-AVJHFI5U.js → chunk-AHTTWCUN.js} +2 -2
- package/dist/{chunk-2OS3DCAF.js → chunk-AMQQEN3C.js} +3 -3
- package/dist/{chunk-GP4OOXKW.js → chunk-ARMKKHNH.js} +2 -2
- package/dist/chunk-AWKT5UH4.js +9 -0
- package/dist/{chunk-OPEB5JCB.js → chunk-DAKL3777.js} +3 -3
- package/dist/{chunk-3BHHT63K.js → chunk-DRHK2A2I.js} +2 -2
- package/dist/{chunk-BDWC6RXH.js → chunk-ETUXLYPP.js} +2 -2
- package/dist/{chunk-G5PTLH3D.js → chunk-EV4EVJBO.js} +2 -2
- package/dist/{chunk-VTERY2TQ.js → chunk-HJAUT5TT.js} +2 -2
- package/dist/{chunk-OUFJZ264.js → chunk-IB46BZUD.js} +3 -3
- package/dist/{chunk-MN5T5HPT.js → chunk-JL3UQPO5.js} +3 -3
- package/dist/{chunk-XHOYJP3H.js → chunk-JSVT76QU.js} +4 -4
- package/dist/chunk-JSVT76QU.js.map +1 -0
- package/dist/{chunk-KGMEAW2F.js → chunk-MEQPDXMP.js} +2 -1
- package/dist/{chunk-RI6PDM2P.js → chunk-MJM5D4ZR.js} +47 -47
- package/dist/chunk-NR5KJEF3.js +158 -0
- package/dist/chunk-NR5KJEF3.js.map +1 -0
- package/dist/{chunk-S5RPQFWS.js → chunk-NTETVXDJ.js} +3 -3
- package/dist/{chunk-NJZJQGYL.js → chunk-PFQDT3FP.js} +2 -2
- package/dist/{chunk-R3E2VXO3.js → chunk-PP53ZOKP.js} +4 -4
- package/dist/{chunk-ELHWFKY2.js → chunk-PSAK5S6K.js} +6 -6
- package/dist/chunk-PSAK5S6K.js.map +1 -0
- package/dist/{chunk-DL4NHA5U.js → chunk-R7FHLKLM.js} +5 -5
- package/dist/{chunk-O27BJXBR.js → chunk-RCUPG37H.js} +2 -2
- package/dist/{chunk-O75H5FNU.js → chunk-S2DFOD6N.js} +3 -3
- package/dist/{chunk-R2VDNMRX.js → chunk-TN32UOPM.js} +8 -8
- package/dist/{chunk-V2NF62H2.js → chunk-UNBYEYVB.js} +2 -2
- package/dist/{chunk-V5ASWB23.js → chunk-VTLDYH3C.js} +3 -149
- package/dist/chunk-VTLDYH3C.js.map +1 -0
- package/dist/{chunk-VZVIP6SS.js → chunk-X6QZOFCD.js} +3 -3
- package/dist/{chunk-QXQ6YB5M.js → chunk-YOI45I2P.js} +2 -2
- package/dist/{chunk-R35P4DNK.js → chunk-ZC4VZ5Z2.js} +2 -2
- package/dist/{chunk-4TOXX4KZ.js → chunk-ZUUKGNKI.js} +4 -4
- package/dist/{cleanup-RV474OWS.js → cleanup-PDSWU3VO.js} +15 -13
- package/dist/{cleanup-RV474OWS.js.map → cleanup-PDSWU3VO.js.map} +1 -1
- package/dist/{cli-CMKLQSAZ.js → cli-42K5JPQU.js} +3 -3
- package/dist/{config-U7LVTPBG.js → config-ZW3O74ML.js} +3 -3
- package/dist/{diff-V6A3E6PF.js → diff-RXHMHOVU.js} +4 -4
- package/dist/{digest-HGKHWQHL.js → digest-VHEIBXMG.js} +4 -4
- package/dist/{fork-M6BPUFHZ.js → fork-SGANWPZM.js} +12 -12
- package/dist/{history-LLB37UPG.js → history-EKYE6GGN.js} +2 -2
- package/dist/{hook-2XFXXOT2.js → hook-FA67OXLF.js} +4 -4
- package/dist/{hydrate-WZNGM3RI.js → hydrate-Y5O75LD4.js} +2 -2
- package/dist/{init-RILW6IKT.js → init-KSO3YGXO.js} +3 -3
- package/dist/{list-R723GE7D.js → list-KXJJQKTK.js} +2 -2
- package/dist/{move-EQZOZNTD.js → move-74LSWX57.js} +4 -4
- package/dist/{note-B7OQML26.js → note-UMFDJ24N.js} +4 -4
- package/dist/{overlaps-AJKWBKXW.js → overlaps-HJTLLLP3.js} +4 -4
- package/dist/{pin-C34UTZS7.js → pin-EZXTUZWI.js} +4 -4
- package/dist/{pr-7NO3KH4S.js → pr-EIL2XC37.js} +14 -6
- package/dist/pr-EIL2XC37.js.map +1 -0
- package/dist/{prune-QOTXN5QV.js → prune-UMEITJG6.js} +14 -12
- package/dist/{prune-QOTXN5QV.js.map → prune-UMEITJG6.js.map} +1 -1
- package/dist/{pty-host-CXGFWP4E.js → pty-host-PDIDOKSX.js} +2 -2
- package/dist/{read-2QQ3MD5L.js → read-ITVK34D7.js} +4 -4
- package/dist/{recent-KANIMGNZ.js → recent-FZQEBMST.js} +2 -2
- package/dist/{remove-KWZZI3X6.js → remove-6BB5YF4Y.js} +13 -11
- package/dist/{remove-KWZZI3X6.js.map → remove-6BB5YF4Y.js.map} +1 -1
- package/dist/{restart-EQMZSYU4.js → restart-Y3VS53DG.js} +4 -4
- package/dist/{resume-USISTQLB.js → resume-KOSOBSAB.js} +2 -2
- package/dist/{run-B5HRDSZB.js → run-JGWWFLRQ.js} +2 -2
- package/dist/{screen-NZKAG4SG.js → screen-4AFBLAP7.js} +4 -4
- package/dist/{search-YEZLXNYH.js → search-56GJF6RQ.js} +2 -2
- package/dist/{section-BNZF3F46.js → section-UI542QWO.js} +4 -4
- package/dist/{send-7FFX2J2A.js → send-HND6G3ZZ.js} +5 -5
- package/dist/{sessions-W3Q326V6.js → sessions-5I5WKRB3.js} +9 -9
- package/dist/{snooze-BOZY2UBJ.js → snooze-B6K2GAJK.js} +4 -4
- package/dist/{start-IKYSNOQG.js → start-CXIXWN4N.js} +4 -4
- package/dist/{status-7NN4G2V6.js → status-GUDTUV7R.js} +2 -2
- package/dist/{stop-Y6ZPCMEH.js → stop-4U2FUGV4.js} +4 -4
- package/dist/{sync-E3QCS4SI.js → sync-ZT5BG6M5.js} +14 -12
- package/dist/{sync-E3QCS4SI.js.map → sync-ZT5BG6M5.js.map} +1 -1
- package/dist/{time-OV5QUVK7.js → time-Q2TZZDKJ.js} +5 -5
- package/dist/{timesheet-UW3TUCPB.js → timesheet-ZPPK4Z3X.js} +6 -6
- package/dist/{tree-ZBBZ3KSM.js → tree-K43PH4GN.js} +10 -9
- package/dist/{tree-ZBBZ3KSM.js.map → tree-K43PH4GN.js.map} +1 -1
- package/dist/{update-SX3ASLLP.js → update-PBEMQ2OL.js} +6 -6
- package/dist/{wait-S47NIZBT.js → wait-GDA333KG.js} +5 -5
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/PtyView-BWZTSZVM.js +96 -0
- package/dist/web/assets/PtyView-BWZTSZVM.js.map +1 -0
- package/dist/web/assets/{index-Bk5sa_rZ.js → index-BMXb8iCa.js} +4 -4
- package/dist/web/assets/{index-Bk5sa_rZ.js.map → index-BMXb8iCa.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/{web-JDIY5YYG.js → web-B7XWKWLG.js} +67 -41
- package/dist/web-B7XWKWLG.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-24HYZTJV.js.map +0 -1
- package/dist/chunk-CNRMBMJU.js +0 -9
- package/dist/chunk-ELHWFKY2.js.map +0 -1
- package/dist/chunk-V5ASWB23.js.map +0 -1
- package/dist/chunk-XHOYJP3H.js.map +0 -1
- package/dist/pr-7NO3KH4S.js.map +0 -1
- package/dist/web/assets/PtyView-CKM2c8yQ.js +0 -93
- package/dist/web/assets/PtyView-CKM2c8yQ.js.map +0 -1
- package/dist/web-JDIY5YYG.js.map +0 -1
- /package/dist/{add-repo-VVECUDF3.js.map → add-repo-RICWFTP3.js.map} +0 -0
- /package/dist/{answer-ZB45WLRZ.js.map → answer-7IAI4IQW.js.map} +0 -0
- /package/dist/{attach-VSJ4LGJD.js.map → attach-5PEDASVQ.js.map} +0 -0
- /package/dist/{block-IK2JJ5BZ.js.map → block-2FZ7DQP3.js.map} +0 -0
- /package/dist/{broadcast-2TIITC7F.js.map → broadcast-NK3NQ6KB.js.map} +0 -0
- /package/dist/{catchup-MSV2CLUE.js.map → catchup-3L5AQMRK.js.map} +0 -0
- /package/dist/{chunk-U2MUU3TT.js.map → chunk-2HT2UH5Q.js.map} +0 -0
- /package/dist/{chunk-BE2KPUJX.js.map → chunk-5BMIBSIN.js.map} +0 -0
- /package/dist/{chunk-6SLZK5GD.js.map → chunk-5WH2ZFN6.js.map} +0 -0
- /package/dist/{chunk-UL5TB4LY.js.map → chunk-6HBIR2I4.js.map} +0 -0
- /package/dist/{chunk-AVJHFI5U.js.map → chunk-AHTTWCUN.js.map} +0 -0
- /package/dist/{chunk-2OS3DCAF.js.map → chunk-AMQQEN3C.js.map} +0 -0
- /package/dist/{chunk-GP4OOXKW.js.map → chunk-ARMKKHNH.js.map} +0 -0
- /package/dist/{chunk-CNRMBMJU.js.map → chunk-AWKT5UH4.js.map} +0 -0
- /package/dist/{chunk-OPEB5JCB.js.map → chunk-DAKL3777.js.map} +0 -0
- /package/dist/{chunk-3BHHT63K.js.map → chunk-DRHK2A2I.js.map} +0 -0
- /package/dist/{chunk-BDWC6RXH.js.map → chunk-ETUXLYPP.js.map} +0 -0
- /package/dist/{chunk-G5PTLH3D.js.map → chunk-EV4EVJBO.js.map} +0 -0
- /package/dist/{chunk-VTERY2TQ.js.map → chunk-HJAUT5TT.js.map} +0 -0
- /package/dist/{chunk-OUFJZ264.js.map → chunk-IB46BZUD.js.map} +0 -0
- /package/dist/{chunk-MN5T5HPT.js.map → chunk-JL3UQPO5.js.map} +0 -0
- /package/dist/{chunk-KGMEAW2F.js.map → chunk-MEQPDXMP.js.map} +0 -0
- /package/dist/{chunk-RI6PDM2P.js.map → chunk-MJM5D4ZR.js.map} +0 -0
- /package/dist/{chunk-S5RPQFWS.js.map → chunk-NTETVXDJ.js.map} +0 -0
- /package/dist/{chunk-NJZJQGYL.js.map → chunk-PFQDT3FP.js.map} +0 -0
- /package/dist/{chunk-R3E2VXO3.js.map → chunk-PP53ZOKP.js.map} +0 -0
- /package/dist/{chunk-DL4NHA5U.js.map → chunk-R7FHLKLM.js.map} +0 -0
- /package/dist/{chunk-O27BJXBR.js.map → chunk-RCUPG37H.js.map} +0 -0
- /package/dist/{chunk-O75H5FNU.js.map → chunk-S2DFOD6N.js.map} +0 -0
- /package/dist/{chunk-R2VDNMRX.js.map → chunk-TN32UOPM.js.map} +0 -0
- /package/dist/{chunk-V2NF62H2.js.map → chunk-UNBYEYVB.js.map} +0 -0
- /package/dist/{chunk-VZVIP6SS.js.map → chunk-X6QZOFCD.js.map} +0 -0
- /package/dist/{chunk-QXQ6YB5M.js.map → chunk-YOI45I2P.js.map} +0 -0
- /package/dist/{chunk-R35P4DNK.js.map → chunk-ZC4VZ5Z2.js.map} +0 -0
- /package/dist/{chunk-4TOXX4KZ.js.map → chunk-ZUUKGNKI.js.map} +0 -0
- /package/dist/{cli-CMKLQSAZ.js.map → cli-42K5JPQU.js.map} +0 -0
- /package/dist/{config-U7LVTPBG.js.map → config-ZW3O74ML.js.map} +0 -0
- /package/dist/{diff-V6A3E6PF.js.map → diff-RXHMHOVU.js.map} +0 -0
- /package/dist/{digest-HGKHWQHL.js.map → digest-VHEIBXMG.js.map} +0 -0
- /package/dist/{fork-M6BPUFHZ.js.map → fork-SGANWPZM.js.map} +0 -0
- /package/dist/{history-LLB37UPG.js.map → history-EKYE6GGN.js.map} +0 -0
- /package/dist/{hook-2XFXXOT2.js.map → hook-FA67OXLF.js.map} +0 -0
- /package/dist/{hydrate-WZNGM3RI.js.map → hydrate-Y5O75LD4.js.map} +0 -0
- /package/dist/{init-RILW6IKT.js.map → init-KSO3YGXO.js.map} +0 -0
- /package/dist/{list-R723GE7D.js.map → list-KXJJQKTK.js.map} +0 -0
- /package/dist/{move-EQZOZNTD.js.map → move-74LSWX57.js.map} +0 -0
- /package/dist/{note-B7OQML26.js.map → note-UMFDJ24N.js.map} +0 -0
- /package/dist/{overlaps-AJKWBKXW.js.map → overlaps-HJTLLLP3.js.map} +0 -0
- /package/dist/{pin-C34UTZS7.js.map → pin-EZXTUZWI.js.map} +0 -0
- /package/dist/{pty-host-CXGFWP4E.js.map → pty-host-PDIDOKSX.js.map} +0 -0
- /package/dist/{read-2QQ3MD5L.js.map → read-ITVK34D7.js.map} +0 -0
- /package/dist/{recent-KANIMGNZ.js.map → recent-FZQEBMST.js.map} +0 -0
- /package/dist/{restart-EQMZSYU4.js.map → restart-Y3VS53DG.js.map} +0 -0
- /package/dist/{resume-USISTQLB.js.map → resume-KOSOBSAB.js.map} +0 -0
- /package/dist/{run-B5HRDSZB.js.map → run-JGWWFLRQ.js.map} +0 -0
- /package/dist/{screen-NZKAG4SG.js.map → screen-4AFBLAP7.js.map} +0 -0
- /package/dist/{search-YEZLXNYH.js.map → search-56GJF6RQ.js.map} +0 -0
- /package/dist/{section-BNZF3F46.js.map → section-UI542QWO.js.map} +0 -0
- /package/dist/{send-7FFX2J2A.js.map → send-HND6G3ZZ.js.map} +0 -0
- /package/dist/{sessions-W3Q326V6.js.map → sessions-5I5WKRB3.js.map} +0 -0
- /package/dist/{snooze-BOZY2UBJ.js.map → snooze-B6K2GAJK.js.map} +0 -0
- /package/dist/{start-IKYSNOQG.js.map → start-CXIXWN4N.js.map} +0 -0
- /package/dist/{status-7NN4G2V6.js.map → status-GUDTUV7R.js.map} +0 -0
- /package/dist/{stop-Y6ZPCMEH.js.map → stop-4U2FUGV4.js.map} +0 -0
- /package/dist/{time-OV5QUVK7.js.map → time-Q2TZZDKJ.js.map} +0 -0
- /package/dist/{timesheet-UW3TUCPB.js.map → timesheet-ZPPK4Z3X.js.map} +0 -0
- /package/dist/{update-SX3ASLLP.js.map → update-PBEMQ2OL.js.map} +0 -0
- /package/dist/{wait-S47NIZBT.js.map → wait-GDA333KG.js.map} +0 -0
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
archiveWaiting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TN32UOPM.js";
|
|
5
5
|
import "./chunk-AKMPF72Y.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-6K4Q4EG7.js";
|
|
7
7
|
import "./chunk-NZ7HCBSL.js";
|
|
8
|
+
import "./chunk-VTLDYH3C.js";
|
|
9
|
+
import "./chunk-HMK3INUS.js";
|
|
8
10
|
import {
|
|
9
11
|
stopSessionPty
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AMQQEN3C.js";
|
|
11
13
|
import "./chunk-J5J4RR25.js";
|
|
12
14
|
import "./chunk-NWUNF4YG.js";
|
|
13
15
|
import {
|
|
14
16
|
teardownWorktree,
|
|
15
17
|
wouldRefuseRemoval
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PFQDT3FP.js";
|
|
17
19
|
import "./chunk-VGQV4LX7.js";
|
|
18
20
|
import "./chunk-KUCMJHQW.js";
|
|
19
21
|
import "./chunk-PSUJZUYX.js";
|
|
20
22
|
import "./chunk-5WM24P5N.js";
|
|
21
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-ARMKKHNH.js";
|
|
22
24
|
import "./chunk-3GIH4WTA.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-IB46BZUD.js";
|
|
26
|
+
import "./chunk-AHTTWCUN.js";
|
|
25
27
|
import "./chunk-LNHSBM4L.js";
|
|
26
28
|
import {
|
|
27
29
|
getAllTargetNames,
|
|
28
30
|
resolveProjectTarget
|
|
29
31
|
} from "./chunk-R2SR3PER.js";
|
|
30
32
|
import "./chunk-AKGDIBSE.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-EV4EVJBO.js";
|
|
34
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
33
35
|
import "./chunk-XZ5DA5X4.js";
|
|
34
36
|
import "./chunk-ZSHWP2VS.js";
|
|
35
37
|
import "./chunk-HUXS3VAI.js";
|
|
@@ -37,7 +39,7 @@ import {
|
|
|
37
39
|
findSession,
|
|
38
40
|
loadHistory,
|
|
39
41
|
removeSession
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-MEQPDXMP.js";
|
|
41
43
|
import "./chunk-JG3J5TLB.js";
|
|
42
44
|
import "./chunk-RCYI7SRA.js";
|
|
43
45
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -111,4 +113,4 @@ var removeCommand = {
|
|
|
111
113
|
export {
|
|
112
114
|
removeCommand
|
|
113
115
|
};
|
|
114
|
-
//# sourceMappingURL=remove-
|
|
116
|
+
//# sourceMappingURL=remove-6BB5YF4Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/remove.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { archiveWaiting } from '../core/archive/session-archive-deps.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { stopSessionPty } from '../core/pty/pty-pool.js';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { resolveProjectTarget, getAllTargetNames } from '../core/worktree/resolve.js';\nimport { teardownWorktree, wouldRefuseRemoval } from '../core/worktree/worktree.js';\nimport { findSession, loadHistory, removeSession } from '../core/sessions/history.js';\n\nexport const removeCommand: CommandModule = {\n command: 'remove <target> <branch>',\n describe: 'Remove a worktree',\n builder: (yargs) =>\n yargs\n .showHelpOnFail(true)\n .positional('target', {\n describe: 'Project alias or group name',\n type: 'string',\n demandOption: true,\n })\n .positional('branch', {\n describe: 'Branch name (e.g., feature/login)',\n type: 'string',\n demandOption: true,\n })\n .option('force', {\n describe: 'Force remove even with uncommitted/unpushed changes',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const targetName = argv.target as string;\n const branchName = argv.branch as string;\n const force = argv.force as boolean;\n\n const config = ensureConfig();\n\n const target = resolveProjectTarget(targetName, config);\n if (!target) {\n const allNames = getAllTargetNames(config);\n console.error(`Project or group not found: ${targetName}`);\n console.log(chalk.yellow(`Available: ${allNames.join(', ')}`));\n process.exitCode = 1;\n return;\n }\n\n // What removing would cut off — its Claude mid-turn or waiting on you,\n // replies to post, notes not yet delivered — refuses it unless --force,\n // as the dashboard's delete does.\n const existing = findSession(loadHistory(), targetName, branchName);\n if (existing && !force) {\n const waiting = archiveWaiting(sessionIdFor(existing));\n if (waiting.length) {\n console.error(chalk.red(`Not removed: ${waiting.join('; ')}.`));\n console.log(chalk.yellow(`Use 'work remove ${targetName} ${branchName} --force' to remove it anyway.`));\n process.exitCode = 1;\n return;\n }\n }\n\n console.log(chalk.cyan(`Removing worktree: ${targetName}/${branchName}`));\n console.log('');\n\n // A Claude still running in the worktree (PTY host session) holds it\n // open — Windows refuses the delete — so stop it first. Only when the\n // removal will go through: a refused one must leave the agent running.\n const paths = findSession(loadHistory(), targetName, branchName)?.paths ?? [];\n if (paths.every((p) => !wouldRefuseRemoval(p, force))) {\n await stopSessionPty(targetName, branchName);\n }\n // The session's folder, not the branch name: the branch checked out in it\n // may have been switched since.\n const allRemoved = teardownWorktree(targetName, target.isGroup, branchName, config, force, paths.length ? paths : undefined);\n\n if (allRemoved === true) {\n await removeSession(targetName, branchName);\n } else {\n process.exitCode = 1;\n console.log('');\n console.log(chalk.yellow('Some worktrees could not be removed due to uncommitted/unpushed changes.'));\n console.log(chalk.yellow(`Use 'work remove ${targetName} ${branchName} --force' to force remove.`));\n }\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/remove.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { archiveWaiting } from '../core/archive/session-archive-deps.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { stopSessionPty } from '../core/pty/pty-pool.js';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { resolveProjectTarget, getAllTargetNames } from '../core/worktree/resolve.js';\nimport { teardownWorktree, wouldRefuseRemoval } from '../core/worktree/worktree.js';\nimport { findSession, loadHistory, removeSession } from '../core/sessions/history.js';\n\nexport const removeCommand: CommandModule = {\n command: 'remove <target> <branch>',\n describe: 'Remove a worktree',\n builder: (yargs) =>\n yargs\n .showHelpOnFail(true)\n .positional('target', {\n describe: 'Project alias or group name',\n type: 'string',\n demandOption: true,\n })\n .positional('branch', {\n describe: 'Branch name (e.g., feature/login)',\n type: 'string',\n demandOption: true,\n })\n .option('force', {\n describe: 'Force remove even with uncommitted/unpushed changes',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const targetName = argv.target as string;\n const branchName = argv.branch as string;\n const force = argv.force as boolean;\n\n const config = ensureConfig();\n\n const target = resolveProjectTarget(targetName, config);\n if (!target) {\n const allNames = getAllTargetNames(config);\n console.error(`Project or group not found: ${targetName}`);\n console.log(chalk.yellow(`Available: ${allNames.join(', ')}`));\n process.exitCode = 1;\n return;\n }\n\n // What removing would cut off — its Claude mid-turn or waiting on you,\n // replies to post, notes not yet delivered — refuses it unless --force,\n // as the dashboard's delete does.\n const existing = findSession(loadHistory(), targetName, branchName);\n if (existing && !force) {\n const waiting = archiveWaiting(sessionIdFor(existing));\n if (waiting.length) {\n console.error(chalk.red(`Not removed: ${waiting.join('; ')}.`));\n console.log(chalk.yellow(`Use 'work remove ${targetName} ${branchName} --force' to remove it anyway.`));\n process.exitCode = 1;\n return;\n }\n }\n\n console.log(chalk.cyan(`Removing worktree: ${targetName}/${branchName}`));\n console.log('');\n\n // A Claude still running in the worktree (PTY host session) holds it\n // open — Windows refuses the delete — so stop it first. Only when the\n // removal will go through: a refused one must leave the agent running.\n const paths = findSession(loadHistory(), targetName, branchName)?.paths ?? [];\n if (paths.every((p) => !wouldRefuseRemoval(p, force))) {\n await stopSessionPty(targetName, branchName);\n }\n // The session's folder, not the branch name: the branch checked out in it\n // may have been switched since.\n const allRemoved = teardownWorktree(targetName, target.isGroup, branchName, config, force, paths.length ? paths : undefined);\n\n if (allRemoved === true) {\n await removeSession(targetName, branchName);\n } else {\n process.exitCode = 1;\n console.log('');\n console.log(chalk.yellow('Some worktrees could not be removed due to uncommitted/unpushed changes.'));\n console.log(chalk.yellow(`Use 'work remove ${targetName} ${branchName} --force' to force remove.`));\n }\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAUX,IAAM,gBAA+B;AAAA,EAC1C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,eAAe,IAAI,EACnB,WAAW,UAAU;AAAA,IACpB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,cAAc;AAAA,EAChB,CAAC,EACA,WAAW,UAAU;AAAA,IACpB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,cAAc;AAAA,EAChB,CAAC,EACA,OAAO,SAAS;AAAA,IACf,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAAA,EACL,SAAS,OAAO,SAAS;AACvB,UAAM,aAAa,KAAK;AACxB,UAAM,aAAa,KAAK;AACxB,UAAM,QAAQ,KAAK;AAEnB,UAAM,SAAS,aAAa;AAE5B,UAAM,SAAS,qBAAqB,YAAY,MAAM;AACtD,QAAI,CAAC,QAAQ;AACX,YAAM,WAAW,kBAAkB,MAAM;AACzC,cAAQ,MAAM,+BAA+B,UAAU,EAAE;AACzD,cAAQ,IAAI,MAAM,OAAO,cAAc,SAAS,KAAK,IAAI,CAAC,EAAE,CAAC;AAC7D,cAAQ,WAAW;AACnB;AAAA,IACF;AAKA,UAAM,WAAW,YAAY,YAAY,GAAG,YAAY,UAAU;AAClE,QAAI,YAAY,CAAC,OAAO;AACtB,YAAM,UAAU,eAAe,aAAa,QAAQ,CAAC;AACrD,UAAI,QAAQ,QAAQ;AAClB,gBAAQ,MAAM,MAAM,IAAI,gBAAgB,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC;AAC9D,gBAAQ,IAAI,MAAM,OAAO,oBAAoB,UAAU,IAAI,UAAU,gCAAgC,CAAC;AACtG,gBAAQ,WAAW;AACnB;AAAA,MACF;AAAA,IACF;AAEA,YAAQ,IAAI,MAAM,KAAK,sBAAsB,UAAU,IAAI,UAAU,EAAE,CAAC;AACxE,YAAQ,IAAI,EAAE;AAKd,UAAM,QAAQ,YAAY,YAAY,GAAG,YAAY,UAAU,GAAG,SAAS,CAAC;AAC5E,QAAI,MAAM,MAAM,CAAC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAC,GAAG;AACrD,YAAM,eAAe,YAAY,UAAU;AAAA,IAC7C;AAGA,UAAM,aAAa,iBAAiB,YAAY,OAAO,SAAS,YAAY,QAAQ,OAAO,MAAM,SAAS,QAAQ,MAAS;AAE3H,QAAI,eAAe,MAAM;AACvB,YAAM,cAAc,YAAY,UAAU;AAAA,IAC5C,OAAO;AACL,cAAQ,WAAW;AACnB,cAAQ,IAAI,EAAE;AACd,cAAQ,IAAI,MAAM,OAAO,0EAA0E,CAAC;AACpG,cAAQ,IAAI,MAAM,OAAO,oBAAoB,UAAU,IAAI,UAAU,4BAA4B,CAAC;AAAA,IACpG;AAAA,EACF;AACF;","names":[]}
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
sessionFromArgs,
|
|
7
7
|
sessionPositionals
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JL3UQPO5.js";
|
|
9
9
|
import "./chunk-6AQRYLOB.js";
|
|
10
10
|
import {
|
|
11
11
|
callWorkWeb
|
|
12
12
|
} from "./chunk-KGZRNWEN.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
14
14
|
import "./chunk-XZ5DA5X4.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
16
|
import "./chunk-HUXS3VAI.js";
|
|
17
17
|
import {
|
|
18
18
|
loadHistory
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MEQPDXMP.js";
|
|
20
20
|
import "./chunk-JG3J5TLB.js";
|
|
21
21
|
import "./chunk-RCYI7SRA.js";
|
|
22
22
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -67,4 +67,4 @@ var restartCommand = {
|
|
|
67
67
|
export {
|
|
68
68
|
restartCommand
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=restart-
|
|
70
|
+
//# sourceMappingURL=restart-Y3VS53DG.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadHistory,
|
|
12
12
|
recordLaunch,
|
|
13
13
|
touchSession
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MEQPDXMP.js";
|
|
15
15
|
import {
|
|
16
16
|
agentFor
|
|
17
17
|
} from "./chunk-JG3J5TLB.js";
|
|
@@ -79,4 +79,4 @@ var resumeCommand = {
|
|
|
79
79
|
export {
|
|
80
80
|
resumeCommand
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=resume-
|
|
82
|
+
//# sourceMappingURL=resume-KOSOBSAB.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-WMJIU3YW.js";
|
|
7
7
|
import {
|
|
8
8
|
loadHistory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MEQPDXMP.js";
|
|
10
10
|
import "./chunk-JG3J5TLB.js";
|
|
11
11
|
import "./chunk-RCYI7SRA.js";
|
|
12
12
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -263,4 +263,4 @@ export {
|
|
|
263
263
|
runPool,
|
|
264
264
|
stripRunToken
|
|
265
265
|
};
|
|
266
|
-
//# sourceMappingURL=run-
|
|
266
|
+
//# sourceMappingURL=run-JGWWFLRQ.js.map
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
sessionFromArgs,
|
|
7
7
|
sessionPositionals
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JL3UQPO5.js";
|
|
9
9
|
import "./chunk-6AQRYLOB.js";
|
|
10
10
|
import {
|
|
11
11
|
callWorkWeb
|
|
12
12
|
} from "./chunk-KGZRNWEN.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
14
14
|
import "./chunk-XZ5DA5X4.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
16
|
import "./chunk-HUXS3VAI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-MEQPDXMP.js";
|
|
18
18
|
import "./chunk-JG3J5TLB.js";
|
|
19
19
|
import "./chunk-RCYI7SRA.js";
|
|
20
20
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -56,4 +56,4 @@ var screenCommand = {
|
|
|
56
56
|
export {
|
|
57
57
|
screenCommand
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=screen-
|
|
59
|
+
//# sourceMappingURL=screen-4AFBLAP7.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
loadHistory,
|
|
4
4
|
searchConversations,
|
|
5
5
|
syncConversations
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MEQPDXMP.js";
|
|
7
7
|
import "./chunk-JG3J5TLB.js";
|
|
8
8
|
import "./chunk-RCYI7SRA.js";
|
|
9
9
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -44,4 +44,4 @@ var searchCommand = {
|
|
|
44
44
|
export {
|
|
45
45
|
searchCommand
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=search-
|
|
47
|
+
//# sourceMappingURL=search-56GJF6RQ.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
sessionFromArgs,
|
|
10
10
|
sessionPositionals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JL3UQPO5.js";
|
|
12
12
|
import "./chunk-6AQRYLOB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
14
14
|
import "./chunk-XZ5DA5X4.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
16
|
import "./chunk-HUXS3VAI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-MEQPDXMP.js";
|
|
18
18
|
import "./chunk-JG3J5TLB.js";
|
|
19
19
|
import "./chunk-RCYI7SRA.js";
|
|
20
20
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -77,4 +77,4 @@ var sectionCommand = {
|
|
|
77
77
|
export {
|
|
78
78
|
sectionCommand
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=section-
|
|
80
|
+
//# sourceMappingURL=section-UI542QWO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
cliWaitDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ETUXLYPP.js";
|
|
5
5
|
import {
|
|
6
6
|
parseDuration,
|
|
7
7
|
sendHowText,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
sessionFromArgs,
|
|
16
16
|
sessionPositionals
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JL3UQPO5.js";
|
|
18
18
|
import "./chunk-6AQRYLOB.js";
|
|
19
19
|
import {
|
|
20
20
|
callWorkWeb
|
|
21
21
|
} from "./chunk-KGZRNWEN.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
23
23
|
import "./chunk-XZ5DA5X4.js";
|
|
24
24
|
import "./chunk-ZSHWP2VS.js";
|
|
25
25
|
import "./chunk-HUXS3VAI.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-MEQPDXMP.js";
|
|
27
27
|
import {
|
|
28
28
|
agentOf
|
|
29
29
|
} from "./chunk-JG3J5TLB.js";
|
|
@@ -85,4 +85,4 @@ var sendCommand = {
|
|
|
85
85
|
export {
|
|
86
86
|
sendCommand
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=send-
|
|
88
|
+
//# sourceMappingURL=send-HND6G3ZZ.js.map
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
lastActiveMs,
|
|
4
4
|
sessionWire
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PSAK5S6K.js";
|
|
6
6
|
import {
|
|
7
7
|
scanChanges
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-DRHK2A2I.js";
|
|
9
|
+
import "./chunk-JSVT76QU.js";
|
|
10
10
|
import {
|
|
11
11
|
timeAgo
|
|
12
12
|
} from "./chunk-UQ35KLHH.js";
|
|
13
13
|
import "./chunk-AKMPF72Y.js";
|
|
14
14
|
import {
|
|
15
15
|
statusFromOutput
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AMQQEN3C.js";
|
|
17
17
|
import "./chunk-J5J4RR25.js";
|
|
18
18
|
import {
|
|
19
19
|
PtyHostClient,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-NWUNF4YG.js";
|
|
22
22
|
import "./chunk-KUCMJHQW.js";
|
|
23
23
|
import "./chunk-5WM24P5N.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-ARMKKHNH.js";
|
|
25
25
|
import "./chunk-3GIH4WTA.js";
|
|
26
26
|
import {
|
|
27
27
|
AGE_LABEL,
|
|
@@ -30,15 +30,15 @@ import {
|
|
|
30
30
|
ageBucket,
|
|
31
31
|
displayStatus,
|
|
32
32
|
waitingOnOthers
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-EV4EVJBO.js";
|
|
34
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
35
35
|
import "./chunk-XZ5DA5X4.js";
|
|
36
36
|
import "./chunk-ZSHWP2VS.js";
|
|
37
37
|
import "./chunk-HUXS3VAI.js";
|
|
38
38
|
import {
|
|
39
39
|
loadHistory,
|
|
40
40
|
owedToYou
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-MEQPDXMP.js";
|
|
42
42
|
import "./chunk-JG3J5TLB.js";
|
|
43
43
|
import "./chunk-RCYI7SRA.js";
|
|
44
44
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
sessionRows,
|
|
148
148
|
sessionsCommand
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=sessions-
|
|
150
|
+
//# sourceMappingURL=sessions-5I5WKRB3.js.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
sessionFromArgs,
|
|
4
4
|
sessionPositionals
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JL3UQPO5.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
8
8
|
import "./chunk-XZ5DA5X4.js";
|
|
9
9
|
import "./chunk-ZSHWP2VS.js";
|
|
10
10
|
import "./chunk-HUXS3VAI.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
parseWhen,
|
|
14
14
|
requestSnooze,
|
|
15
15
|
snoozeLabel
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MEQPDXMP.js";
|
|
17
17
|
import "./chunk-JG3J5TLB.js";
|
|
18
18
|
import "./chunk-RCYI7SRA.js";
|
|
19
19
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -63,4 +63,4 @@ var snoozeCommand = {
|
|
|
63
63
|
export {
|
|
64
64
|
snoozeCommand
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=snooze-
|
|
66
|
+
//# sourceMappingURL=snooze-B6K2GAJK.js.map
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
sessionFromArgs,
|
|
4
4
|
sessionPositionals
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JL3UQPO5.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
7
|
import {
|
|
8
8
|
callWorkWeb
|
|
9
9
|
} from "./chunk-KGZRNWEN.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
11
11
|
import "./chunk-XZ5DA5X4.js";
|
|
12
12
|
import "./chunk-ZSHWP2VS.js";
|
|
13
13
|
import "./chunk-HUXS3VAI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-MEQPDXMP.js";
|
|
15
15
|
import "./chunk-JG3J5TLB.js";
|
|
16
16
|
import "./chunk-RCYI7SRA.js";
|
|
17
17
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -54,4 +54,4 @@ var startCommand = {
|
|
|
54
54
|
export {
|
|
55
55
|
startCommand
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=start-
|
|
57
|
+
//# sourceMappingURL=start-CXIXWN4N.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getSessionsForTarget,
|
|
15
15
|
loadHistory,
|
|
16
16
|
prunePersistedStaleEntries
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MEQPDXMP.js";
|
|
18
18
|
import "./chunk-JG3J5TLB.js";
|
|
19
19
|
import "./chunk-RCYI7SRA.js";
|
|
20
20
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -116,4 +116,4 @@ function printSessionStatus(session) {
|
|
|
116
116
|
export {
|
|
117
117
|
statusCommand
|
|
118
118
|
};
|
|
119
|
-
//# sourceMappingURL=status-
|
|
119
|
+
//# sourceMappingURL=status-GUDTUV7R.js.map
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
sessionFromArgs,
|
|
4
4
|
sessionPositionals
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JL3UQPO5.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
7
|
import {
|
|
8
8
|
callWorkWeb
|
|
9
9
|
} from "./chunk-KGZRNWEN.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
11
11
|
import "./chunk-XZ5DA5X4.js";
|
|
12
12
|
import "./chunk-ZSHWP2VS.js";
|
|
13
13
|
import "./chunk-HUXS3VAI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-MEQPDXMP.js";
|
|
15
15
|
import "./chunk-JG3J5TLB.js";
|
|
16
16
|
import "./chunk-RCYI7SRA.js";
|
|
17
17
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -43,4 +43,4 @@ var stopCommand = {
|
|
|
43
43
|
export {
|
|
44
44
|
stopCommand
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=stop-
|
|
46
|
+
//# sourceMappingURL=stop-4U2FUGV4.js.map
|
|
@@ -5,35 +5,37 @@ import {
|
|
|
5
5
|
} from "./chunk-ABQYKTG4.js";
|
|
6
6
|
import {
|
|
7
7
|
defaultCleanupDeps
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-5BMIBSIN.js";
|
|
9
|
+
import "./chunk-TN32UOPM.js";
|
|
10
10
|
import {
|
|
11
11
|
applyCleanup,
|
|
12
12
|
scanCleanup
|
|
13
13
|
} from "./chunk-AKMPF72Y.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-6K4Q4EG7.js";
|
|
15
15
|
import "./chunk-NZ7HCBSL.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-VTLDYH3C.js";
|
|
17
|
+
import "./chunk-HMK3INUS.js";
|
|
18
|
+
import "./chunk-AMQQEN3C.js";
|
|
17
19
|
import "./chunk-J5J4RR25.js";
|
|
18
20
|
import "./chunk-NWUNF4YG.js";
|
|
19
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-PFQDT3FP.js";
|
|
20
22
|
import "./chunk-VGQV4LX7.js";
|
|
21
23
|
import "./chunk-KUCMJHQW.js";
|
|
22
24
|
import "./chunk-PSUJZUYX.js";
|
|
23
25
|
import "./chunk-5WM24P5N.js";
|
|
24
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-ARMKKHNH.js";
|
|
25
27
|
import "./chunk-3GIH4WTA.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-IB46BZUD.js";
|
|
29
|
+
import "./chunk-AHTTWCUN.js";
|
|
28
30
|
import "./chunk-LNHSBM4L.js";
|
|
29
31
|
import "./chunk-R2SR3PER.js";
|
|
30
32
|
import "./chunk-AKGDIBSE.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-EV4EVJBO.js";
|
|
34
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
33
35
|
import "./chunk-XZ5DA5X4.js";
|
|
34
36
|
import "./chunk-ZSHWP2VS.js";
|
|
35
37
|
import "./chunk-HUXS3VAI.js";
|
|
36
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-MEQPDXMP.js";
|
|
37
39
|
import "./chunk-JG3J5TLB.js";
|
|
38
40
|
import "./chunk-RCYI7SRA.js";
|
|
39
41
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -99,4 +101,4 @@ var syncCommand = {
|
|
|
99
101
|
export {
|
|
100
102
|
syncCommand
|
|
101
103
|
};
|
|
102
|
-
//# sourceMappingURL=sync-
|
|
104
|
+
//# sourceMappingURL=sync-ZT5BG6M5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sync.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const syncCommand: CommandModule = {\n command: 'sync',\n describe: 'Fetch all repos and remove merged worktrees (non-interactive)',\n builder: (yargs) =>\n yargs\n .option('dry-run', {\n describe: 'Show what would be removed without removing anything',\n type: 'boolean',\n default: false,\n })\n .option('force', {\n describe:\n 'Also remove merged worktrees that have uncommitted changes (those changes are lost). ' +\n 'A worktree with commits the main branch lacks is never removed.',\n type: 'boolean',\n default: false,\n })\n .option('include-squash', {\n describe: 'Also remove branches detected as squash-merged ' + '(default: false — unattended sync requires a true merge)',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const dryRun = argv['dryRun'] as boolean;\n const force = argv['force'] as boolean;\n const includeSquash = argv['includeSquash'] as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n\n console.log(chalk.gray('Fetching all repos and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n // A repo whose fetch failed has stale refs: its worktrees were not judged.\n for (const f of scan.fetchFailed)\n console.log(chalk.yellow(` Warning: fetch failed for ${f.alias} — skipping it (refs may be stale): ${f.error}`));\n\n const chosen = removable(scan.candidates, { includeSquash, dirtyToo: force });\n const skippedDirty = removable(scan.candidates, { includeSquash, dirtyToo: true }).length - chosen.length;\n if (chosen.length === 0) {\n console.log(chalk.green('No merged worktrees to remove. Everything is in sync.'));\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n return;\n }\n console.log(chalk.cyan(`${dryRun ? 'Would remove' : 'Removing'} ${chosen.length} merged worktree(s):`));\n for (const c of chosen) console.log(` ${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`);\n console.log('');\n if (dryRun) {\n console.log(chalk.yellow(`Dry run: nothing removed.`));\n return;\n }\n const results = await applyCleanup(\n deps,\n chosen.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? ('forget' as const) : ('delete' as const) })),\n { force },\n );\n printCleanupResults(chosen, results);\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n // A removal that git refused is a failure for scripts; \"changed since the\n // scan\" is a safe skip, counted in the summary above.\n if (results.some((r) => !r.ok && r.message.startsWith('git refused'))) process.exitCode = 1;\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sync.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const syncCommand: CommandModule = {\n command: 'sync',\n describe: 'Fetch all repos and remove merged worktrees (non-interactive)',\n builder: (yargs) =>\n yargs\n .option('dry-run', {\n describe: 'Show what would be removed without removing anything',\n type: 'boolean',\n default: false,\n })\n .option('force', {\n describe:\n 'Also remove merged worktrees that have uncommitted changes (those changes are lost). ' +\n 'A worktree with commits the main branch lacks is never removed.',\n type: 'boolean',\n default: false,\n })\n .option('include-squash', {\n describe: 'Also remove branches detected as squash-merged ' + '(default: false — unattended sync requires a true merge)',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const dryRun = argv['dryRun'] as boolean;\n const force = argv['force'] as boolean;\n const includeSquash = argv['includeSquash'] as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n\n console.log(chalk.gray('Fetching all repos and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n // A repo whose fetch failed has stale refs: its worktrees were not judged.\n for (const f of scan.fetchFailed)\n console.log(chalk.yellow(` Warning: fetch failed for ${f.alias} — skipping it (refs may be stale): ${f.error}`));\n\n const chosen = removable(scan.candidates, { includeSquash, dirtyToo: force });\n const skippedDirty = removable(scan.candidates, { includeSquash, dirtyToo: true }).length - chosen.length;\n if (chosen.length === 0) {\n console.log(chalk.green('No merged worktrees to remove. Everything is in sync.'));\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n return;\n }\n console.log(chalk.cyan(`${dryRun ? 'Would remove' : 'Removing'} ${chosen.length} merged worktree(s):`));\n for (const c of chosen) console.log(` ${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`);\n console.log('');\n if (dryRun) {\n console.log(chalk.yellow(`Dry run: nothing removed.`));\n return;\n }\n const results = await applyCleanup(\n deps,\n chosen.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? ('forget' as const) : ('delete' as const) })),\n { force },\n );\n printCleanupResults(chosen, results);\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n // A removal that git refused is a failure for scripts; \"changed since the\n // scan\" is a safe skip, counted in the summary above.\n if (results.some((r) => !r.ok && r.message.startsWith('git refused'))) process.exitCode = 1;\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAOX,IAAM,cAA6B;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,OAAO,WAAW;AAAA,IACjB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC,EACA,OAAO,SAAS;AAAA,IACf,UACE;AAAA,IAEF,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC,EACA,OAAO,kBAAkB;AAAA,IACxB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAAA,EACL,SAAS,OAAO,SAAS;AACvB,UAAM,SAAS,KAAK,QAAQ;AAC5B,UAAM,QAAQ,KAAK,OAAO;AAC1B,UAAM,gBAAgB,KAAK,eAAe;AAC1C,iBAAa;AACb,UAAM,OAAO,mBAAmB;AAEhC,YAAQ,IAAI,MAAM,KAAK,mDAA8C,CAAC;AACtE,UAAM,OAAO,MAAM,YAAY,IAAI;AAEnC,eAAW,KAAK,KAAK;AACnB,cAAQ,IAAI,MAAM,OAAO,+BAA+B,EAAE,KAAK,4CAAuC,EAAE,KAAK,EAAE,CAAC;AAElH,UAAM,SAAS,UAAU,KAAK,YAAY,EAAE,eAAe,UAAU,MAAM,CAAC;AAC5E,UAAM,eAAe,UAAU,KAAK,YAAY,EAAE,eAAe,UAAU,KAAK,CAAC,EAAE,SAAS,OAAO;AACnG,QAAI,OAAO,WAAW,GAAG;AACvB,cAAQ,IAAI,MAAM,MAAM,uDAAuD,CAAC;AAChF,UAAI,eAAe,EAAG,SAAQ,IAAI,MAAM,OAAO,WAAW,YAAY,uDAAuD,CAAC;AAC9H;AAAA,IACF;AACA,YAAQ,IAAI,MAAM,KAAK,GAAG,SAAS,iBAAiB,UAAU,IAAI,OAAO,MAAM,sBAAsB,CAAC;AACtG,eAAW,KAAK,OAAQ,SAAQ,IAAI,KAAK,EAAE,MAAM,KAAK,EAAE,MAAM,GAAG,EAAE,UAAU,aAAa,EAAE,WAAM,EAAE,MAAM,EAAE;AAC5G,YAAQ,IAAI,EAAE;AACd,QAAI,QAAQ;AACV,cAAQ,IAAI,MAAM,OAAO,2BAA2B,CAAC;AACrD;AAAA,IACF;AACA,UAAM,UAAU,MAAM;AAAA,MACpB;AAAA,MACA,OAAO,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,QAAQ,EAAE,YAAY,SAAU,WAAsB,SAAmB,EAAE;AAAA,MACxH,EAAE,MAAM;AAAA,IACV;AACA,wBAAoB,QAAQ,OAAO;AACnC,QAAI,eAAe,EAAG,SAAQ,IAAI,MAAM,OAAO,WAAW,YAAY,uDAAuD,CAAC;AAG9H,QAAI,QAAQ,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,WAAW,aAAa,CAAC,EAAG,SAAQ,WAAW;AAAA,EAC5F;AACF;","names":[]}
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
} from "./chunk-6SJOM62D.js";
|
|
8
8
|
import {
|
|
9
9
|
sessionWorkTime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UNBYEYVB.js";
|
|
11
11
|
import {
|
|
12
12
|
sessionFromArgs,
|
|
13
13
|
sessionPositionals
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JL3UQPO5.js";
|
|
15
15
|
import "./chunk-6AQRYLOB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ZC4VZ5Z2.js";
|
|
17
17
|
import "./chunk-XZ5DA5X4.js";
|
|
18
18
|
import "./chunk-ZSHWP2VS.js";
|
|
19
19
|
import "./chunk-HUXS3VAI.js";
|
|
20
20
|
import {
|
|
21
21
|
loadHistory
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MEQPDXMP.js";
|
|
23
23
|
import "./chunk-JG3J5TLB.js";
|
|
24
24
|
import "./chunk-RCYI7SRA.js";
|
|
25
25
|
import {
|
|
@@ -112,4 +112,4 @@ var timeCommand = {
|
|
|
112
112
|
export {
|
|
113
113
|
timeCommand
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=time-
|
|
115
|
+
//# sourceMappingURL=time-Q2TZZDKJ.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defaultTimeDeps
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-PP53ZOKP.js";
|
|
5
|
+
import "./chunk-UNBYEYVB.js";
|
|
6
|
+
import "./chunk-IB46BZUD.js";
|
|
7
|
+
import "./chunk-AHTTWCUN.js";
|
|
8
8
|
import "./chunk-AKGDIBSE.js";
|
|
9
9
|
import {
|
|
10
10
|
buildDay,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
callWorkWeb
|
|
22
22
|
} from "./chunk-KGZRNWEN.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-MEQPDXMP.js";
|
|
24
24
|
import "./chunk-JG3J5TLB.js";
|
|
25
25
|
import "./chunk-RCYI7SRA.js";
|
|
26
26
|
import "./chunk-NEJVK5CF.js";
|
|
@@ -144,4 +144,4 @@ var timesheetCommand = {
|
|
|
144
144
|
export {
|
|
145
145
|
timesheetCommand
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=timesheet-
|
|
147
|
+
//# sourceMappingURL=timesheet-ZPPK4Z3X.js.map
|
|
@@ -4,21 +4,22 @@ import {
|
|
|
4
4
|
openInLeftovers,
|
|
5
5
|
resolvePrToStart,
|
|
6
6
|
workOnPrPrompt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NR5KJEF3.js";
|
|
8
8
|
import {
|
|
9
9
|
launchAi,
|
|
10
10
|
openVSCode
|
|
11
11
|
} from "./chunk-NJT26JI3.js";
|
|
12
|
-
import "./chunk-HMK3INUS.js";
|
|
13
12
|
import "./chunk-NZ7HCBSL.js";
|
|
13
|
+
import "./chunk-VTLDYH3C.js";
|
|
14
|
+
import "./chunk-HMK3INUS.js";
|
|
14
15
|
import {
|
|
15
16
|
attachSession
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HJAUT5TT.js";
|
|
17
18
|
import {
|
|
18
19
|
SETUP_WARNINGS
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DAKL3777.js";
|
|
20
21
|
import "./chunk-AH5TM3NB.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-AMQQEN3C.js";
|
|
22
23
|
import "./chunk-J5J4RR25.js";
|
|
23
24
|
import "./chunk-NWUNF4YG.js";
|
|
24
25
|
import {
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
openBaseCheckout,
|
|
28
29
|
parseBaseSpec,
|
|
29
30
|
setupWorktree
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PFQDT3FP.js";
|
|
31
32
|
import "./chunk-VGQV4LX7.js";
|
|
32
33
|
import "./chunk-KUCMJHQW.js";
|
|
33
34
|
import "./chunk-PSUJZUYX.js";
|
|
@@ -40,12 +41,12 @@ import {
|
|
|
40
41
|
resolveProjectTarget
|
|
41
42
|
} from "./chunk-R2SR3PER.js";
|
|
42
43
|
import "./chunk-AKGDIBSE.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-EV4EVJBO.js";
|
|
44
45
|
import {
|
|
45
46
|
findSession,
|
|
46
47
|
loadHistory,
|
|
47
48
|
recordLaunch
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-MEQPDXMP.js";
|
|
49
50
|
import {
|
|
50
51
|
agentFor
|
|
51
52
|
} from "./chunk-JG3J5TLB.js";
|
|
@@ -290,4 +291,4 @@ var treeCommand = {
|
|
|
290
291
|
export {
|
|
291
292
|
treeCommand
|
|
292
293
|
};
|
|
293
|
-
//# sourceMappingURL=tree-
|
|
294
|
+
//# sourceMappingURL=tree-K43PH4GN.js.map
|