@dylanpiercey/work 0.0.122 → 0.0.124
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/bin/work.mjs +61 -17
- package/dist/_8GaDFTzQ.js +2 -0
- package/dist/{_DJyHc1w-.js → _930ti7l4.js} +4 -4
- package/dist/{_CfwTkTbL.js → _BJcBOXUi.js} +2 -2
- package/dist/{_BPX2_wNT.js → _Bzb6xzDq.js} +17 -17
- package/dist/{_BdBrOaZF.js → _CBA__L3F.js} +50 -50
- package/dist/_CrVv317N.js +2 -0
- package/dist/{_Cr71Xd0d.js → _DOBRRnfU.js} +13 -3
- package/dist/_iX5oUHA_.js +2 -0
- package/dist/index.mjs +1196 -737
- package/dist/public/assets/{_Dwsfrcqr.js → _0BOh03kg.js} +1 -1
- package/dist/public/assets/_0BOh03kg.js.br +0 -0
- package/dist/public/assets/{_ih_22Lwc.js → _6APRznCj.js} +1 -1
- package/dist/public/assets/_6APRznCj.js.br +0 -0
- package/dist/public/assets/{_DZXcx3AV2.js → _7mj205Em2.js} +1 -1
- package/dist/public/assets/_7mj205Em2.js.br +0 -0
- package/dist/public/assets/{_9NNG2Bg-.js → _9aVyqty8.js} +1 -1
- package/dist/public/assets/_9aVyqty8.js.br +0 -0
- package/dist/public/assets/{_Bkd9T8qO2.js → _AmbAR7S52.js} +1 -1
- package/dist/public/assets/_AmbAR7S52.js.br +0 -0
- package/dist/public/assets/{_a18bdHwu2.js → _B44tyyUG2.js} +1 -1
- package/dist/public/assets/_B44tyyUG2.js.br +0 -0
- package/dist/public/assets/{_ClA-9QLW.js → _BBxg4PRF.js} +1 -1
- package/dist/public/assets/_BBxg4PRF.js.br +0 -0
- package/dist/public/assets/{_DegNdi0y2.js → _BC012r8W2.js} +1 -1
- package/dist/public/assets/_BC012r8W2.js.br +0 -0
- package/dist/public/assets/{_BxfzYLyp.js → _BDrcfwfI.js} +1 -1
- package/dist/public/assets/_BDrcfwfI.js.br +0 -0
- package/dist/public/assets/{_DL2HExUi2.js → _BHJ9GJI52.js} +1 -1
- package/dist/public/assets/_BHJ9GJI52.js.br +0 -0
- package/dist/public/assets/{_CPCFHsPT2.js → _BHZFjFr72.js} +1 -1
- package/dist/public/assets/_BHZFjFr72.js.br +0 -0
- package/dist/public/assets/{_DLbcflUX2.js → _BJFqA5yY2.js} +1 -1
- package/dist/public/assets/_BJFqA5yY2.js.br +0 -0
- package/dist/public/assets/{_6yLwnUth.js → _BKfwbuKk.js} +1 -1
- package/dist/public/assets/_BKfwbuKk.js.br +0 -0
- package/dist/public/assets/{_Y8lHXkX62.js → _BLqcxg502.js} +1 -1
- package/dist/public/assets/_BLqcxg502.js.br +0 -0
- package/dist/public/assets/{_BO_carFG.js → _BOMd8TCK.js} +1 -1
- package/dist/public/assets/_BOMd8TCK.js.br +0 -0
- package/dist/public/assets/{_DWZLw9u5.js → _BZ1ORFOG.js} +1 -1
- package/dist/public/assets/_BZ1ORFOG.js.br +0 -0
- package/dist/public/assets/{_BvJHLrwP2.js → _BbElRt4j2.js} +1 -1
- package/dist/public/assets/_BbElRt4j2.js.br +0 -0
- package/dist/public/assets/{_BPjnrd1A.js → _BeiKlFyF.js} +1 -1
- package/dist/public/assets/_BeiKlFyF.js.br +0 -0
- package/dist/public/assets/{_DDNq8klN.js → _Bfxr0cJZ.js} +1 -1
- package/dist/public/assets/_Bfxr0cJZ.js.br +0 -0
- package/dist/public/assets/{_CW70CETb.js → _BngsVbfs.js} +1 -1
- package/dist/public/assets/_BngsVbfs.js.br +0 -0
- package/dist/public/assets/{_BO5eXuo12.js → _Bo6N68cW2.js} +1 -1
- package/dist/public/assets/_Bo6N68cW2.js.br +0 -0
- package/dist/public/assets/{_4C4ZKftZ.js → _BqMMY6m_.js} +1 -1
- package/dist/public/assets/_BqMMY6m_.js.br +0 -0
- package/dist/public/assets/{_9wp1Weya.js → _Bu1p9uSE.js} +1 -1
- package/dist/public/assets/_Bu1p9uSE.js.br +0 -0
- package/dist/public/assets/{_BcnKn75V.js → _Bwf6AXcG.js} +23 -23
- package/dist/public/assets/_Bwf6AXcG.js.br +0 -0
- package/dist/public/assets/{_22Wep3Qj2.js → _BxfEGvTl2.js} +1 -1
- package/dist/public/assets/{_Bhf_wksG.js → _By0ZhvwN.js} +1 -1
- package/dist/public/assets/_By0ZhvwN.js.br +0 -0
- package/dist/public/assets/{_BgxHsV2q.js → _BzZTGAcf.js} +1 -1
- package/dist/public/assets/_BzZTGAcf.js.br +0 -0
- package/dist/public/assets/{_CLM87vGj.js → _C3jgMqec.js} +1 -1
- package/dist/public/assets/_C3jgMqec.js.br +0 -0
- package/dist/public/assets/{_BvTWp2QQ.js → _C7K5skmZ.js} +1 -1
- package/dist/public/assets/_C7K5skmZ.js.br +0 -0
- package/dist/public/assets/{_8ixfpSLV.js → _C7xNavdA.js} +1 -1
- package/dist/public/assets/_C7xNavdA.js.br +0 -0
- package/dist/public/assets/{_DOa36sDf2.js → _C8zp54RX2.js} +1 -1
- package/dist/public/assets/_C8zp54RX2.js.br +0 -0
- package/dist/public/assets/{_DfLxwQXd.js → _CNIVJCYh.js} +1 -1
- package/dist/public/assets/_CNIVJCYh.js.br +0 -0
- package/dist/public/assets/{_BcA9iBrt.js → _Ccw2WcFJ.js} +1 -1
- package/dist/public/assets/_Ccw2WcFJ.js.br +0 -0
- package/dist/public/assets/{_CorgOnjQ.js → _CdJgBBp1.js} +1 -1
- package/dist/public/assets/_CdJgBBp1.js.br +0 -0
- package/dist/public/assets/{_D2SIC9vH2.js → _Ce_0QLmD2.js} +1 -1
- package/dist/public/assets/_Ce_0QLmD2.js.br +0 -0
- package/dist/public/assets/{_CpByFq0N.js → _Cg4e3YdF.js} +1 -1
- package/dist/public/assets/_Cg4e3YdF.js.br +0 -0
- package/dist/public/assets/{_Buu8_cyc.js → _ChgUBap2.js} +1 -1
- package/dist/public/assets/_ChgUBap2.js.br +0 -0
- package/dist/public/assets/{_kQ849tt6.js → _CkMbbZTV.js} +1 -1
- package/dist/public/assets/_CkMbbZTV.js.br +0 -0
- package/dist/public/assets/{_BllRu2dt.js → _Clf2e2n_.js} +1 -1
- package/dist/public/assets/_Clf2e2n_.js.br +0 -0
- package/dist/public/assets/{_DY5MuJqh.js → _CpBLPn2w.js} +1 -1
- package/dist/public/assets/_CpBLPn2w.js.br +0 -0
- package/dist/public/assets/{_D_5rjG0o.js → _CrdZJZZd.js} +1 -1
- package/dist/public/assets/_CrdZJZZd.js.br +0 -0
- package/dist/public/assets/{_CNVk64eD.js → _Csc5thvE.js} +1 -1
- package/dist/public/assets/_Csc5thvE.js.br +0 -0
- package/dist/public/assets/{_Bz61WBUI.js → _Cxsd1Imx.js} +1 -1
- package/dist/public/assets/_Cxsd1Imx.js.br +0 -0
- package/dist/public/assets/{_CNBki2Aq.js → _D1EW4Pmg.js} +1 -1
- package/dist/public/assets/_D1EW4Pmg.js.br +0 -0
- package/dist/public/assets/{_W9aOkr2v.js → _D7F06nEE.js} +1 -1
- package/dist/public/assets/_D7F06nEE.js.br +0 -0
- package/dist/public/assets/{_CM8zmLXB.js → _DCWzPBMu.js} +1 -1
- package/dist/public/assets/_DCWzPBMu.js.br +0 -0
- package/dist/public/assets/{_sWtKlZZ5.js → _DFti8M4d.js} +6 -6
- package/dist/public/assets/_DFti8M4d.js.br +0 -0
- package/dist/public/assets/{_DwTIenq9.js → _DHzj4OkK.js} +1 -1
- package/dist/public/assets/_DHzj4OkK.js.br +0 -0
- package/dist/public/assets/{_hO1aV02w2.js → _DLblqdFG2.js} +1 -1
- package/dist/public/assets/{_BfzwZXGo.js → _DSMA17Ls.js} +1 -1
- package/dist/public/assets/_DSMA17Ls.js.br +0 -0
- package/dist/public/assets/{_xvmiPi6J2.js → _DSZXi7PW2.js} +1 -1
- package/dist/public/assets/_DSZXi7PW2.js.br +0 -0
- package/dist/public/assets/{_CWU_IJjz2.js → _DU-HvI1X2.js} +1 -1
- package/dist/public/assets/_DU-HvI1X2.js.br +0 -0
- package/dist/public/assets/{_CrlXwiFN2.js → _DU546zvR2.js} +1 -1
- package/dist/public/assets/_DU546zvR2.js.br +0 -0
- package/dist/public/assets/{_B80Me7dX.js → _DXtAKSWy.js} +1 -1
- package/dist/public/assets/{_D1zxC16I2.js → _DYiWc3Qv2.js} +1 -1
- package/dist/public/assets/_DYiWc3Qv2.js.br +0 -0
- package/dist/public/assets/{_CKAWtCKg2.js → _DaicYUdR2.js} +1 -1
- package/dist/public/assets/_DaicYUdR2.js.br +0 -0
- package/dist/public/assets/{_C5fkGs032.js → _Dbdv5Cok2.js} +1 -1
- package/dist/public/assets/_Dbdv5Cok2.js.br +0 -0
- package/dist/public/assets/{_C0Wcm1DA.js → _DeGTY8L-.js} +1 -1
- package/dist/public/assets/_DeGTY8L-.js.br +0 -0
- package/dist/public/assets/{_MEclBKIH.js → _Df4m81GI.js} +1 -1
- package/dist/public/assets/_Df4m81GI.js.br +0 -0
- package/dist/public/assets/{_Z4spekbX.js → _Dg8W2qKd.js} +1 -1
- package/dist/public/assets/_Dg8W2qKd.js.br +0 -0
- package/dist/public/assets/{_lo4uGYhv.js → _DhF3kqKM.js} +1 -1
- package/dist/public/assets/_DhF3kqKM.js.br +0 -0
- package/dist/public/assets/{_CqgcFjOQ.js → _Dkj5kUs_.js} +1 -1
- package/dist/public/assets/_Dkj5kUs_.js.br +0 -0
- package/dist/public/assets/{_CqEc7KwE.js → _DrK8xGce.js} +1 -1
- package/dist/public/assets/_DrK8xGce.js.br +0 -0
- package/dist/public/assets/{_Tpid4lIw.js → _DsFrJ9e-.js} +1 -1
- package/dist/public/assets/_DsFrJ9e-.js.br +0 -0
- package/dist/public/assets/{_DyZPE8LD2.js → _Dtnyhhg42.js} +1 -1
- package/dist/public/assets/_Dtnyhhg42.js.br +0 -0
- package/dist/public/assets/{_BJVUTWAN.js → _DuA-u7gQ.js} +1 -1
- package/dist/public/assets/_DuA-u7gQ.js.br +0 -0
- package/dist/public/assets/{_BYOrCsb12.js → _DxEgOJrA2.js} +1 -1
- package/dist/public/assets/_DxEgOJrA2.js.br +0 -0
- package/dist/public/assets/{_BO6TG3u42.js → _DyFKKRcb2.js} +1 -1
- package/dist/public/assets/_DyFKKRcb2.js.br +0 -0
- package/dist/public/assets/{_BeYy7LJv.js → _PyWD-OLD.js} +1 -1
- package/dist/public/assets/_PyWD-OLD.js.br +0 -0
- package/dist/public/assets/{_5waGGcsH2.js → _XKdqeQJS2.js} +1 -1
- package/dist/public/assets/_XKdqeQJS2.js.br +0 -0
- package/dist/public/assets/{_DMzElmqz.js → _YUHil-cs.js} +1 -1
- package/dist/public/assets/_YUHil-cs.js.br +0 -0
- package/dist/public/assets/{_DbEs3COY.js → _gz2ki5-c.js} +1 -1
- package/dist/public/assets/_gz2ki5-c.js.br +0 -0
- package/dist/public/assets/{_D9QYQO8L.js → _hv6mbBf-.js} +1 -1
- package/dist/public/assets/_hv6mbBf-.js.br +0 -0
- package/dist/public/assets/{_Bgq0Djxf.js → _iUhOV8GI.js} +1 -1
- package/dist/public/assets/_iUhOV8GI.js.br +0 -0
- package/dist/public/assets/{_BQfrm6Hv.js → _kZUgqOeI.js} +1 -1
- package/dist/public/assets/_kZUgqOeI.js.br +0 -0
- package/dist/public/assets/{_CtuCeJaB.js → _lcPvr6W1.js} +1 -1
- package/dist/public/assets/_lcPvr6W1.js.br +0 -0
- package/dist/public/assets/{app-page-9ukuDxSW.css → app-page-Dk_mvqt2.css} +1 -1
- package/dist/public/assets/app-page-Dk_mvqt2.css.br +0 -0
- package/dist/public/assets/{diff-view-BmyKvz_f.css → diff-view-DJbuoCt_.css} +1 -1
- package/dist/public/assets/diff-view-DJbuoCt_.css.br +0 -0
- package/dist/public/assets/new-B8Rn8B9U.js +1 -0
- package/dist/public/assets/settings-B8Rn8B9U.js +1 -0
- package/dist/public/assets/w-B8Rn8B9U.js +1 -0
- package/dist/public/assets/w._-B8Rn8B9U.js +1 -0
- package/dist/public/assets/w._-DIHEc1VL.js +1 -0
- package/package.json +1 -1
- package/dist/_B1lVb01g.js +0 -2
- package/dist/_Bjh5JEm7.js +0 -2
- package/dist/_Dpa8WFuv.js +0 -2
- package/dist/public/assets/_4C4ZKftZ.js.br +0 -0
- package/dist/public/assets/_5waGGcsH2.js.br +0 -0
- package/dist/public/assets/_6yLwnUth.js.br +0 -0
- package/dist/public/assets/_8ixfpSLV.js.br +0 -0
- package/dist/public/assets/_9NNG2Bg-.js.br +0 -0
- package/dist/public/assets/_9wp1Weya.js.br +0 -0
- package/dist/public/assets/_BJVUTWAN.js.br +0 -0
- package/dist/public/assets/_BO5eXuo12.js.br +0 -0
- package/dist/public/assets/_BO6TG3u42.js.br +0 -0
- package/dist/public/assets/_BO_carFG.js.br +0 -0
- package/dist/public/assets/_BPjnrd1A.js.br +0 -0
- package/dist/public/assets/_BQfrm6Hv.js.br +0 -0
- package/dist/public/assets/_BYOrCsb12.js.br +0 -0
- package/dist/public/assets/_BcA9iBrt.js.br +0 -0
- package/dist/public/assets/_BcnKn75V.js.br +0 -0
- package/dist/public/assets/_BeYy7LJv.js.br +0 -0
- package/dist/public/assets/_BfzwZXGo.js.br +0 -0
- package/dist/public/assets/_Bgq0Djxf.js.br +0 -0
- package/dist/public/assets/_BgxHsV2q.js.br +0 -0
- package/dist/public/assets/_Bhf_wksG.js.br +0 -0
- package/dist/public/assets/_Bkd9T8qO2.js.br +0 -0
- package/dist/public/assets/_BllRu2dt.js.br +0 -0
- package/dist/public/assets/_Buu8_cyc.js.br +0 -0
- package/dist/public/assets/_BvJHLrwP2.js.br +0 -0
- package/dist/public/assets/_BvTWp2QQ.js.br +0 -0
- package/dist/public/assets/_BxfzYLyp.js.br +0 -0
- package/dist/public/assets/_Bz61WBUI.js.br +0 -0
- package/dist/public/assets/_C0Wcm1DA.js.br +0 -0
- package/dist/public/assets/_C5fkGs032.js.br +0 -0
- package/dist/public/assets/_CKAWtCKg2.js.br +0 -0
- package/dist/public/assets/_CLM87vGj.js.br +0 -0
- package/dist/public/assets/_CM8zmLXB.js.br +0 -0
- package/dist/public/assets/_CNBki2Aq.js.br +0 -0
- package/dist/public/assets/_CNVk64eD.js.br +0 -0
- package/dist/public/assets/_CPCFHsPT2.js.br +0 -0
- package/dist/public/assets/_CW70CETb.js.br +0 -0
- package/dist/public/assets/_CWU_IJjz2.js.br +0 -0
- package/dist/public/assets/_ClA-9QLW.js.br +0 -0
- package/dist/public/assets/_CorgOnjQ.js.br +0 -0
- package/dist/public/assets/_CpByFq0N.js.br +0 -0
- package/dist/public/assets/_CqEc7KwE.js.br +0 -0
- package/dist/public/assets/_CqgcFjOQ.js.br +0 -0
- package/dist/public/assets/_CrlXwiFN2.js.br +0 -0
- package/dist/public/assets/_CtuCeJaB.js.br +0 -0
- package/dist/public/assets/_D1zxC16I2.js.br +0 -0
- package/dist/public/assets/_D2SIC9vH2.js.br +0 -0
- package/dist/public/assets/_D9QYQO8L.js.br +0 -0
- package/dist/public/assets/_DDNq8klN.js.br +0 -0
- package/dist/public/assets/_DL2HExUi2.js.br +0 -0
- package/dist/public/assets/_DLbcflUX2.js.br +0 -0
- package/dist/public/assets/_DMzElmqz.js.br +0 -0
- package/dist/public/assets/_DOa36sDf2.js.br +0 -0
- package/dist/public/assets/_DWZLw9u5.js.br +0 -0
- package/dist/public/assets/_DY5MuJqh.js.br +0 -0
- package/dist/public/assets/_DZXcx3AV2.js.br +0 -0
- package/dist/public/assets/_D_5rjG0o.js.br +0 -0
- package/dist/public/assets/_DbEs3COY.js.br +0 -0
- package/dist/public/assets/_DegNdi0y2.js.br +0 -0
- package/dist/public/assets/_DfLxwQXd.js.br +0 -0
- package/dist/public/assets/_DwTIenq9.js.br +0 -0
- package/dist/public/assets/_Dwsfrcqr.js.br +0 -0
- package/dist/public/assets/_DyZPE8LD2.js.br +0 -0
- package/dist/public/assets/_MEclBKIH.js.br +0 -0
- package/dist/public/assets/_Tpid4lIw.js.br +0 -0
- package/dist/public/assets/_W9aOkr2v.js.br +0 -0
- package/dist/public/assets/_Y8lHXkX62.js.br +0 -0
- package/dist/public/assets/_Z4spekbX.js.br +0 -0
- package/dist/public/assets/_a18bdHwu2.js.br +0 -0
- package/dist/public/assets/_ih_22Lwc.js.br +0 -0
- package/dist/public/assets/_kQ849tt6.js.br +0 -0
- package/dist/public/assets/_lo4uGYhv.js.br +0 -0
- package/dist/public/assets/_sWtKlZZ5.js.br +0 -0
- package/dist/public/assets/_xvmiPi6J2.js.br +0 -0
- package/dist/public/assets/app-page-9ukuDxSW.css.br +0 -0
- package/dist/public/assets/diff-view-BmyKvz_f.css.br +0 -0
- package/dist/public/assets/new-PmY_tc2O.js +0 -1
- package/dist/public/assets/settings-PmY_tc2O.js +0 -1
- package/dist/public/assets/w-PmY_tc2O.js +0 -1
- package/dist/public/assets/w._-DL1tdfaH.js +0 -1
- package/dist/public/assets/w._-PmY_tc2O.js +0 -1
package/bin/work.mjs
CHANGED
|
@@ -657,25 +657,70 @@ function servicePath() {
|
|
|
657
657
|
return setupPath(path.dirname(process.execPath));
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
/** Argv
|
|
661
|
-
* host is a dead host: agents keep running in tmux, but the
|
|
662
|
-
* answering, so remote sessions look hung until someone wakes
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
|
|
660
|
+
/** Argv prefixes that keep the host awake while the server runs, best first.
|
|
661
|
+
* A suspended host is a dead host: agents keep running in tmux, but the
|
|
662
|
+
* machine stops answering, so remote sessions look hung until someone wakes
|
|
663
|
+
* it by hand. The inhibitor lifts when the service stops.
|
|
664
|
+
*
|
|
665
|
+
* Linux offers two, because polkit gates them differently:
|
|
666
|
+
*
|
|
667
|
+
* sleep:idle also vetoes an explicit suspend, but
|
|
668
|
+
* org.freedesktop.login1.inhibit-block-sleep is
|
|
669
|
+
* allow_any=auth_admin_keep — permitted from a session, refused
|
|
670
|
+
* for a caller that has none. That is the lingering user
|
|
671
|
+
* manager at boot, so the service cannot rely on it.
|
|
672
|
+
* idle org.freedesktop.login1.inhibit-block-idle is allow_any=yes,
|
|
673
|
+
* so this always works. It holds the system non-idle, which is
|
|
674
|
+
* what stops logind's IdleAction (and a desktop's idle-suspend)
|
|
675
|
+
* from ever firing.
|
|
676
|
+
*
|
|
677
|
+
* Idle alone is the honest target anyway — it matches `caffeinate -s`, and
|
|
678
|
+
* declining to veto a suspend the user deliberately asked for is correct.
|
|
679
|
+
* Taking the stronger one when it is allowed costs nothing, so try both. */
|
|
680
|
+
function awakePrefixes() {
|
|
666
681
|
if (process.platform === "darwin")
|
|
667
|
-
return have("caffeinate") ? ["/usr/bin/caffeinate", "-s"] : [];
|
|
682
|
+
return have("caffeinate") ? [["/usr/bin/caffeinate", "-s"]] : [];
|
|
668
683
|
if (process.platform === "linux" && have("systemd-inhibit"))
|
|
669
|
-
return [
|
|
684
|
+
return ["sleep:idle", "idle"].map((what) => [
|
|
670
685
|
"systemd-inhibit",
|
|
671
|
-
|
|
686
|
+
`--what=${what}`,
|
|
672
687
|
"--who=work",
|
|
673
688
|
"--why=work server is running",
|
|
674
689
|
"--mode=block",
|
|
675
|
-
];
|
|
690
|
+
]);
|
|
676
691
|
return [];
|
|
677
692
|
}
|
|
678
693
|
|
|
694
|
+
/** systemd's ExecStart for the linux unit, as one line.
|
|
695
|
+
*
|
|
696
|
+
* With no inhibitor this is just the argv. Otherwise it is a shell that tries
|
|
697
|
+
* each candidate in turn and execs under the first one allowed, because
|
|
698
|
+
* `systemd-inhibit` exits non-zero when polkit refuses — and since it is the
|
|
699
|
+
* unit's ExecStart, that failure takes the whole service down with it. A
|
|
700
|
+
* lingering manager at boot has no session, so the sleep block is refused
|
|
701
|
+
* every time and `Restart=always` retries forever; the server would only come
|
|
702
|
+
* up once someone logged in, defeating the unattended start
|
|
703
|
+
* `loginctl enable-linger` exists to guarantee. Falling through to the
|
|
704
|
+
* ungated idle block keeps the machine awake anyway, and running bare is
|
|
705
|
+
* still better than not running. */
|
|
706
|
+
function serviceExecStart(candidates, argv) {
|
|
707
|
+
// systemd splits on whitespace, so quote any argument containing it.
|
|
708
|
+
const unit = (parts) =>
|
|
709
|
+
parts.map((a) => (a.includes(" ") ? `"${a}"` : a)).join(" ");
|
|
710
|
+
if (!candidates.length) return unit(argv);
|
|
711
|
+
const shq = (a) => `'${a.replace(/'/g, `'\\''`)}'`;
|
|
712
|
+
const cmd = argv.map(shq).join(" ");
|
|
713
|
+
// Each probe takes and drops an inhibitor around `true`; if that is allowed
|
|
714
|
+
// the real one will be too.
|
|
715
|
+
const script = candidates
|
|
716
|
+
.map((c) => {
|
|
717
|
+
const inh = c.map(shq).join(" ");
|
|
718
|
+
return `if ${inh} true 2>/dev/null; then exec ${inh} ${cmd}; fi; `;
|
|
719
|
+
})
|
|
720
|
+
.join("");
|
|
721
|
+
return `/bin/sh -c "${script}exec ${cmd}"`;
|
|
722
|
+
}
|
|
723
|
+
|
|
679
724
|
/** Where installService() writes the service definition — also the store we
|
|
680
725
|
* read settings back out of, so there is no second config file to keep. */
|
|
681
726
|
function serviceFile() {
|
|
@@ -887,9 +932,11 @@ function installService() {
|
|
|
887
932
|
// instead of the CLI — that script carries its own sleep inhibitor and
|
|
888
933
|
// PORT handling, so no awake prefix is layered on top.
|
|
889
934
|
const execOverride = process.env.WORK_SERVICE_EXEC;
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
935
|
+
const target = execOverride ? [execOverride] : [cliPath, "start"];
|
|
936
|
+
const awake = execOverride ? [] : awakePrefixes();
|
|
937
|
+
// launchd takes an argv, not a shell: caffeinate needs no authorisation, so
|
|
938
|
+
// the first candidate is simply used.
|
|
939
|
+
const startArgs = [...(awake[0] || []), ...target];
|
|
893
940
|
if (process.platform === "darwin") {
|
|
894
941
|
const plist = serviceFile();
|
|
895
942
|
fs.mkdirSync(path.dirname(plist), { recursive: true });
|
|
@@ -958,10 +1005,7 @@ ${envXml}
|
|
|
958
1005
|
const envLines = Object.entries(serviceEnv())
|
|
959
1006
|
.map(([k, v]) => `Environment=${k}=${v}`)
|
|
960
1007
|
.join("\n");
|
|
961
|
-
|
|
962
|
-
const execStart = startArgs
|
|
963
|
-
.map((a) => (a.includes(" ") ? `"${a}"` : a))
|
|
964
|
-
.join(" ");
|
|
1008
|
+
const execStart = serviceExecStart(awake, target);
|
|
965
1009
|
fs.writeFileSync(
|
|
966
1010
|
unitFile,
|
|
967
1011
|
`[Unit]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setSetting, V as publish, Y as getSetting, _t as git, bt as config, c as killWorkspaceSessions, dt as all, ft as db, gt as gh, i as disposeSessions, l as listSessions, nt as ghKnownHosts, ot as DEFAULT_GITHUB_HOST, p as panePids, pt as get, vt as run } from "./
|
|
1
|
+
import { $ as setSetting, V as publish, Y as getSetting, _t as git, bt as config, c as killWorkspaceSessions, dt as all, ft as db, gt as gh, i as disposeSessions, l as listSessions, nt as ghKnownHosts, ot as DEFAULT_GITHUB_HOST, p as panePids, pt as get, vt as run } from "./_DOBRRnfU.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1005,7 +1005,7 @@ async function materializeWorkspace(id) {
|
|
|
1005
1005
|
repo.default_branch = defaultBranch;
|
|
1006
1006
|
db.prepare("UPDATE repos SET base_branch = ?, default_branch = ? WHERE workspace_id = ? AND full_name = ?").run(repo.base_branch, defaultBranch, id, repo.full_name);
|
|
1007
1007
|
}
|
|
1008
|
-
(await import("./
|
|
1008
|
+
(await import("./_CrVv317N.js")).muteAutoPush(repo.full_name, ws.branch);
|
|
1009
1009
|
await addWorkspaceWorktree(bare, path.join(ws.path, repo.worktree), ws.branch, repo.base_branch);
|
|
1010
1010
|
added.push(repo);
|
|
1011
1011
|
});
|
|
@@ -1639,7 +1639,7 @@ async function noteRemoteRef(fullName, branch, oid) {
|
|
|
1639
1639
|
if (await revParse(barePath(fullName), `refs/heads/${branch}`) !== oid) return;
|
|
1640
1640
|
rememberPushed(k, oid);
|
|
1641
1641
|
if (failures.delete(k)) {
|
|
1642
|
-
const { pokeStatusWatch } = await import("./
|
|
1642
|
+
const { pokeStatusWatch } = await import("./_8GaDFTzQ.js");
|
|
1643
1643
|
pokeStatusWatch();
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
@@ -1704,7 +1704,7 @@ async function pushOnce(fullName, branch, bases) {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
async function fail(k, why) {
|
|
1706
1706
|
failures.set(k, why);
|
|
1707
|
-
const { pokeStatusWatch } = await import("./
|
|
1707
|
+
const { pokeStatusWatch } = await import("./_8GaDFTzQ.js");
|
|
1708
1708
|
pokeStatusWatch();
|
|
1709
1709
|
return why;
|
|
1710
1710
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as subscriberCount, V as publish, W as subscriberJoins, dt as all, ft as db, g as sessionStates, l as listSessions } from "./
|
|
2
|
-
import { A as portsByWorkspace, J as hostToken, K as forgetToken, M as headOid, Q as ownsBranch, R as repoParent, V as DEFAULT_HOST, Y as joinRepo, Z as splitRepo, h as listWorkspaces, o as pushFailureFor, q as graphqlUrl, z as swr } from "./
|
|
1
|
+
import { U as subscriberCount, V as publish, W as subscriberJoins, dt as all, ft as db, g as sessionStates, l as listSessions } from "./_DOBRRnfU.js";
|
|
2
|
+
import { A as portsByWorkspace, J as hostToken, K as forgetToken, M as headOid, Q as ownsBranch, R as repoParent, V as DEFAULT_HOST, Y as joinRepo, Z as splitRepo, h as listWorkspaces, o as pushFailureFor, q as graphqlUrl, z as swr } from "./_930ti7l4.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
//#region src/server/github-api.ts
|
|
5
5
|
/** Run a GraphQL query against one host.
|
|
@@ -1978,7 +1978,7 @@ var toastTitle = {
|
|
|
1978
1978
|
};
|
|
1979
1979
|
//#endregion
|
|
1980
1980
|
//#region src/tags/icons/icon-base.marko
|
|
1981
|
-
var icon_base_default = _template("
|
|
1981
|
+
var icon_base_default = _template("O", (input) => {
|
|
1982
1982
|
const $scope0_reason = _scope_reason();
|
|
1983
1983
|
const $scope0_id = _scope_id();
|
|
1984
1984
|
const size = input.size ?? 15;
|
|
@@ -1987,7 +1987,7 @@ var icon_base_default = _template("N", (input) => {
|
|
|
1987
1987
|
});
|
|
1988
1988
|
//#endregion
|
|
1989
1989
|
//#region src/tags/icons/icon-xmark.marko
|
|
1990
|
-
var icon_xmark_default = _template("
|
|
1990
|
+
var icon_xmark_default = _template("ob", (input) => {
|
|
1991
1991
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
1992
1992
|
const $scope0_id = _scope_id();
|
|
1993
1993
|
_set_serialize_reason({
|
|
@@ -2004,7 +2004,7 @@ var icon_xmark_default = _template("nb", (input) => {
|
|
|
2004
2004
|
});
|
|
2005
2005
|
//#endregion
|
|
2006
2006
|
//#region src/tags/toast.marko
|
|
2007
|
-
var toast_default = _template("
|
|
2007
|
+
var toast_default = _template("E", (input) => {
|
|
2008
2008
|
const $scope0_reason = _scope_reason(), $sg__input_title = _serialize_guard($scope0_reason, 7), $sg__input_title__OR__input_content__OR__input_action__OR__input_onDismiss = _serialize_guard($scope0_reason, 5), $sg__input_content = _serialize_guard($scope0_reason, 8), $sg__input_action = _serialize_guard($scope0_reason, 9), $sg__input_action__OR__input_onDismiss = _serialize_guard($scope0_reason, 3), $sg__input_onDismiss = _serialize_guard($scope0_reason, 11), $si__input_content = _serialize_if($scope0_reason, 8), $si__input_action__OR__input_onDismiss = _serialize_if($scope0_reason, 3), $si__input_action_content = _serialize_if($scope0_reason, 10);
|
|
2009
2009
|
const $scope0_id = _scope_id();
|
|
2010
2010
|
const $input_action_content__closures = /* @__PURE__ */ new Set();
|
|
@@ -2061,7 +2061,7 @@ var toast_default = _template("D", (input) => {
|
|
|
2061
2061
|
_html(`<button${_attr_class([iconBtnRow, "_bm"])} type=button title=Dismiss aria-label=Dismiss>`);
|
|
2062
2062
|
icon_xmark_default({ size: 14 });
|
|
2063
2063
|
_html(`</button>${_el_resume($scope5_id, "a")}`);
|
|
2064
|
-
_script($scope5_id, "
|
|
2064
|
+
_script($scope5_id, "E0");
|
|
2065
2065
|
writeScope($scope5_id, { _: _scope_with_id($scope3_id) });
|
|
2066
2066
|
return 0;
|
|
2067
2067
|
}
|
|
@@ -2072,8 +2072,8 @@ var toast_default = _template("D", (input) => {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
}, $scope0_id, "e", $sg__input_action__OR__input_onDismiss, $sg__input_action__OR__input_onDismiss, $sg__input_title__OR__input_content__OR__input_action__OR__input_onDismiss, 0, 1);
|
|
2074
2074
|
_html(`</div>${_el_resume($scope0_id, "a")}`);
|
|
2075
|
-
_script($scope0_id, "
|
|
2076
|
-
_script($scope0_id, "
|
|
2075
|
+
_script($scope0_id, "E1");
|
|
2076
|
+
_script($scope0_id, "E2");
|
|
2077
2077
|
writeScope($scope0_id, {
|
|
2078
2078
|
j: _serialize_if($scope0_reason, 7) && title,
|
|
2079
2079
|
k: _serialize_if($scope0_reason, 0) && inputClass,
|
|
@@ -2173,12 +2173,12 @@ function theme() {
|
|
|
2173
2173
|
function setTheme(mode) {
|
|
2174
2174
|
set("theme", mode === "system" ? null : mode);
|
|
2175
2175
|
}
|
|
2176
|
-
var sectionCount = "
|
|
2177
|
-
var row = "
|
|
2176
|
+
var sectionCount = "_bq _H _I";
|
|
2177
|
+
var row = "_bB _bt";
|
|
2178
2178
|
var iconBtn = "_Z _j";
|
|
2179
2179
|
//#endregion
|
|
2180
2180
|
//#region src/tags/icons/icon-refresh.marko
|
|
2181
|
-
var icon_refresh_default = _template("
|
|
2181
|
+
var icon_refresh_default = _template("gb", (input) => {
|
|
2182
2182
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2183
2183
|
const $scope0_id = _scope_id();
|
|
2184
2184
|
_set_serialize_reason({
|
|
@@ -2195,7 +2195,7 @@ var icon_refresh_default = _template("fb", (input) => {
|
|
|
2195
2195
|
});
|
|
2196
2196
|
//#endregion
|
|
2197
2197
|
//#region src/tags/icons/icon-back.marko
|
|
2198
|
-
var icon_back_default = _template("
|
|
2198
|
+
var icon_back_default = _template("N", (input) => {
|
|
2199
2199
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2200
2200
|
const $scope0_id = _scope_id();
|
|
2201
2201
|
_set_serialize_reason({
|
|
@@ -2212,7 +2212,7 @@ var icon_back_default = _template("M", (input) => {
|
|
|
2212
2212
|
});
|
|
2213
2213
|
//#endregion
|
|
2214
2214
|
//#region src/tags/icons/icon-chevron-right.marko
|
|
2215
|
-
var icon_chevron_right_default = _template("
|
|
2215
|
+
var icon_chevron_right_default = _template("T", (input) => {
|
|
2216
2216
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2217
2217
|
const $scope0_id = _scope_id();
|
|
2218
2218
|
_set_serialize_reason({
|
|
@@ -2229,7 +2229,7 @@ var icon_chevron_right_default = _template("S", (input) => {
|
|
|
2229
2229
|
});
|
|
2230
2230
|
//#endregion
|
|
2231
2231
|
//#region src/tags/icons/icon-arrow-up.marko
|
|
2232
|
-
var icon_arrow_up_default = _template("
|
|
2232
|
+
var icon_arrow_up_default = _template("M", (input) => {
|
|
2233
2233
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2234
2234
|
const $scope0_id = _scope_id();
|
|
2235
2235
|
_set_serialize_reason({
|
|
@@ -2246,7 +2246,7 @@ var icon_arrow_up_default = _template("L", (input) => {
|
|
|
2246
2246
|
});
|
|
2247
2247
|
//#endregion
|
|
2248
2248
|
//#region src/tags/icons/icon-search.marko
|
|
2249
|
-
var icon_search_default = _template("
|
|
2249
|
+
var icon_search_default = _template("hb", (input) => {
|
|
2250
2250
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2251
2251
|
const $scope0_id = _scope_id();
|
|
2252
2252
|
_set_serialize_reason({
|
|
@@ -2305,7 +2305,7 @@ function fuzzy(query, text) {
|
|
|
2305
2305
|
}
|
|
2306
2306
|
//#endregion
|
|
2307
2307
|
//#region src/tags/icons/icon-sidebar.marko
|
|
2308
|
-
var icon_sidebar_default = _template("
|
|
2308
|
+
var icon_sidebar_default = _template("kb", (input) => {
|
|
2309
2309
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2310
2310
|
const $scope0_id = _scope_id();
|
|
2311
2311
|
_set_serialize_reason({
|
|
@@ -2320,11 +2320,11 @@ var icon_sidebar_default = _template("jb", (input) => {
|
|
|
2320
2320
|
});
|
|
2321
2321
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
2322
2322
|
});
|
|
2323
|
-
var findInput = "
|
|
2324
|
-
var findIconBtn = "
|
|
2323
|
+
var findInput = "_f9 _l";
|
|
2324
|
+
var findIconBtn = "_gb _j";
|
|
2325
2325
|
//#endregion
|
|
2326
2326
|
//#region src/tags/icons/icon-arrow-down.marko
|
|
2327
|
-
var icon_arrow_down_default = _template("
|
|
2327
|
+
var icon_arrow_down_default = _template("J", (input) => {
|
|
2328
2328
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2329
2329
|
const $scope0_id = _scope_id();
|
|
2330
2330
|
_set_serialize_reason({
|