@namzu/cli 45.3.2 → 45.4.0
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/CHANGELOG.md +13 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-EG4R7GRW.js → acp-AZLFAOF4.js} +8 -8
- package/dist/chunks/{add-WCTFVJME.js → add-KVRGXPPT.js} +5 -5
- package/dist/chunks/{agent-MYJCIPY4.js → agent-HT7EZDCT.js} +4 -4
- package/dist/chunks/{agent-session-UD2M3O3F.js → agent-session-DZ2QN7FF.js} +5 -5
- package/dist/chunks/{bin-main-AVXYUWUH.js → bin-main-NJ2NAGPI.js} +3 -3
- package/dist/chunks/{chat-X73GLI7I.js → chat-DXPIIYP5.js} +2 -2
- package/dist/chunks/chunk-6CO3EL6W.js +260 -0
- package/dist/chunks/chunk-6CO3EL6W.js.map +6 -0
- package/dist/chunks/{chunk-KRFMMLXB.js → chunk-6Q3EYVF6.js} +2 -2
- package/dist/chunks/{chunk-6VC6HCJN.js → chunk-7PDAYGAP.js} +2 -2
- package/dist/chunks/{chunk-VLOL3NC2.js → chunk-A5L4UGFM.js} +2 -2
- package/dist/chunks/{chunk-LM3KO4HQ.js → chunk-BV4Q6GZ7.js} +3 -3
- package/dist/chunks/{chunk-P7DEIENP.js → chunk-BVSMAMQU.js} +4 -4
- package/dist/chunks/{chunk-4G3CFDPS.js → chunk-HVMVHXWZ.js} +17 -17
- package/dist/chunks/{chunk-YHBEEH3I.js → chunk-IRUUF5QR.js} +2 -2
- package/dist/chunks/{chunk-DSRA44I5.js → chunk-J2UG66BV.js} +2 -2
- package/dist/chunks/{chunk-ICIAFQVV.js → chunk-J5NFEZ7Y.js} +3 -3
- package/dist/chunks/{chunk-JU5CYBAG.js → chunk-JNV6273F.js} +2 -2
- package/dist/chunks/{chunk-DAJQVD5D.js → chunk-JXAQGOHB.js} +2 -2
- package/dist/chunks/{chunk-43DHPUWU.js → chunk-NC5GT5ZI.js} +2 -2
- package/dist/chunks/{chunk-LXN2DGZE.js → chunk-RQPWIXDZ.js} +2 -2
- package/dist/chunks/{chunk-QNC7WED2.js → chunk-SYLU4JOG.js} +2 -2
- package/dist/chunks/{chunk-V2CEMLV5.js → chunk-TCGL3NEE.js} +3 -3
- package/dist/chunks/{chunk-3QHNIWDT.js → chunk-U4VQFHZ2.js} +2 -2
- package/dist/chunks/{chunk-TPS77GVG.js → chunk-UI3MVW3U.js} +2 -2
- package/dist/chunks/{chunk-HSNO7GHL.js → chunk-VSXHM53L.js} +5 -5
- package/dist/chunks/{chunk-6JICK2PM.js → chunk-WX23VXH7.js} +2 -2
- package/dist/chunks/{chunk-32TNYMYN.js → chunk-XZWVGQYH.js} +5 -2
- package/dist/chunks/{chunk-32TNYMYN.js.map → chunk-XZWVGQYH.js.map} +1 -1
- package/dist/chunks/{chunk-KAWEN22C.js → chunk-YD7KHMDW.js} +3 -3
- package/dist/chunks/{cli-runtime-RV4V7WDI.js → cli-runtime-YAAF4SRC.js} +3 -3
- package/dist/chunks/{doctor-OL6W7JUG.js → doctor-7WER3J7R.js} +6 -6
- package/dist/chunks/{drain-HPY22IFR.js → drain-TUEONE4F.js} +2 -2
- package/dist/chunks/{exec-EWDNB4SA.js → exec-YIFVF55O.js} +7 -7
- package/dist/chunks/{host-queries-MHM7JXK5.js → host-queries-42XPCXBX.js} +2 -2
- package/dist/chunks/{learn-IABAEUDX.js → learn-GUSW5DAS.js} +2 -2
- package/dist/chunks/{learn-builtin-IYZBPO3K.js → learn-builtin-BDNUVVBH.js} +3 -3
- package/dist/chunks/{lifecycle-XZKHLCKI.js → lifecycle-L2BR7PZQ.js} +6 -6
- package/dist/chunks/{list-CCBHSOQ5.js → list-GBFUOWMJ.js} +3 -3
- package/dist/chunks/{live-S5T5J3HY.js → live-TSLMCW2I.js} +5 -5
- package/dist/chunks/{mcp-PKLR4XKA.js → mcp-ZGT7SPGO.js} +2 -2
- package/dist/chunks/{message-command-XS7J46MH.js → message-command-5C6IA2PX.js} +7 -7
- package/dist/chunks/{pal-MKSD6D7G.js → pal-VEA2XW4R.js} +3 -3
- package/dist/chunks/{resident-RZBZHKII.js → resident-OHM7RGYD.js} +4 -4
- package/dist/chunks/{schedule-CIA3VATB.js → schedule-ILFE3JJQ.js} +5 -5
- package/dist/chunks/{service-42J5XJT5.js → service-PDZFN4KY.js} +38 -276
- package/dist/chunks/service-PDZFN4KY.js.map +6 -0
- package/dist/chunks/{session-step-HQSIBIBB.js → session-step-7KH6LKZW.js} +2 -2
- package/dist/chunks/{start-check-YMAUKQOU.js → start-check-2JJWODNG.js} +2 -2
- package/dist/chunks/{tui-WTI3Z45D.js → tui-7ZC32IBL.js} +293 -71
- package/dist/chunks/tui-7ZC32IBL.js.map +6 -0
- package/dist/chunks/{upgrade-WBBH6O5R.js → upgrade-YVFOGNHR.js} +3 -3
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +8 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/integrations/notifications/sound/chime.d.ts +18 -0
- package/dist/integrations/notifications/sound/chime.d.ts.map +1 -0
- package/dist/integrations/notifications/sound.d.ts +83 -0
- package/dist/integrations/notifications/sound.d.ts.map +1 -0
- package/dist/integrations/resident/runner-worker.js +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunks/service-42J5XJT5.js.map +0 -6
- package/dist/chunks/tui-WTI3Z45D.js.map +0 -6
- /package/dist/chunks/{acp-EG4R7GRW.js.map → acp-AZLFAOF4.js.map} +0 -0
- /package/dist/chunks/{add-WCTFVJME.js.map → add-KVRGXPPT.js.map} +0 -0
- /package/dist/chunks/{agent-MYJCIPY4.js.map → agent-HT7EZDCT.js.map} +0 -0
- /package/dist/chunks/{agent-session-UD2M3O3F.js.map → agent-session-DZ2QN7FF.js.map} +0 -0
- /package/dist/chunks/{bin-main-AVXYUWUH.js.map → bin-main-NJ2NAGPI.js.map} +0 -0
- /package/dist/chunks/{chat-X73GLI7I.js.map → chat-DXPIIYP5.js.map} +0 -0
- /package/dist/chunks/{chunk-KRFMMLXB.js.map → chunk-6Q3EYVF6.js.map} +0 -0
- /package/dist/chunks/{chunk-6VC6HCJN.js.map → chunk-7PDAYGAP.js.map} +0 -0
- /package/dist/chunks/{chunk-VLOL3NC2.js.map → chunk-A5L4UGFM.js.map} +0 -0
- /package/dist/chunks/{chunk-LM3KO4HQ.js.map → chunk-BV4Q6GZ7.js.map} +0 -0
- /package/dist/chunks/{chunk-P7DEIENP.js.map → chunk-BVSMAMQU.js.map} +0 -0
- /package/dist/chunks/{chunk-4G3CFDPS.js.map → chunk-HVMVHXWZ.js.map} +0 -0
- /package/dist/chunks/{chunk-YHBEEH3I.js.map → chunk-IRUUF5QR.js.map} +0 -0
- /package/dist/chunks/{chunk-DSRA44I5.js.map → chunk-J2UG66BV.js.map} +0 -0
- /package/dist/chunks/{chunk-ICIAFQVV.js.map → chunk-J5NFEZ7Y.js.map} +0 -0
- /package/dist/chunks/{chunk-JU5CYBAG.js.map → chunk-JNV6273F.js.map} +0 -0
- /package/dist/chunks/{chunk-DAJQVD5D.js.map → chunk-JXAQGOHB.js.map} +0 -0
- /package/dist/chunks/{chunk-43DHPUWU.js.map → chunk-NC5GT5ZI.js.map} +0 -0
- /package/dist/chunks/{chunk-LXN2DGZE.js.map → chunk-RQPWIXDZ.js.map} +0 -0
- /package/dist/chunks/{chunk-QNC7WED2.js.map → chunk-SYLU4JOG.js.map} +0 -0
- /package/dist/chunks/{chunk-V2CEMLV5.js.map → chunk-TCGL3NEE.js.map} +0 -0
- /package/dist/chunks/{chunk-3QHNIWDT.js.map → chunk-U4VQFHZ2.js.map} +0 -0
- /package/dist/chunks/{chunk-TPS77GVG.js.map → chunk-UI3MVW3U.js.map} +0 -0
- /package/dist/chunks/{chunk-HSNO7GHL.js.map → chunk-VSXHM53L.js.map} +0 -0
- /package/dist/chunks/{chunk-6JICK2PM.js.map → chunk-WX23VXH7.js.map} +0 -0
- /package/dist/chunks/{chunk-KAWEN22C.js.map → chunk-YD7KHMDW.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-RV4V7WDI.js.map → cli-runtime-YAAF4SRC.js.map} +0 -0
- /package/dist/chunks/{doctor-OL6W7JUG.js.map → doctor-7WER3J7R.js.map} +0 -0
- /package/dist/chunks/{drain-HPY22IFR.js.map → drain-TUEONE4F.js.map} +0 -0
- /package/dist/chunks/{exec-EWDNB4SA.js.map → exec-YIFVF55O.js.map} +0 -0
- /package/dist/chunks/{host-queries-MHM7JXK5.js.map → host-queries-42XPCXBX.js.map} +0 -0
- /package/dist/chunks/{learn-IABAEUDX.js.map → learn-GUSW5DAS.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-IYZBPO3K.js.map → learn-builtin-BDNUVVBH.js.map} +0 -0
- /package/dist/chunks/{lifecycle-XZKHLCKI.js.map → lifecycle-L2BR7PZQ.js.map} +0 -0
- /package/dist/chunks/{list-CCBHSOQ5.js.map → list-GBFUOWMJ.js.map} +0 -0
- /package/dist/chunks/{live-S5T5J3HY.js.map → live-TSLMCW2I.js.map} +0 -0
- /package/dist/chunks/{mcp-PKLR4XKA.js.map → mcp-ZGT7SPGO.js.map} +0 -0
- /package/dist/chunks/{message-command-XS7J46MH.js.map → message-command-5C6IA2PX.js.map} +0 -0
- /package/dist/chunks/{pal-MKSD6D7G.js.map → pal-VEA2XW4R.js.map} +0 -0
- /package/dist/chunks/{resident-RZBZHKII.js.map → resident-OHM7RGYD.js.map} +0 -0
- /package/dist/chunks/{schedule-CIA3VATB.js.map → schedule-ILFE3JJQ.js.map} +0 -0
- /package/dist/chunks/{session-step-HQSIBIBB.js.map → session-step-7KH6LKZW.js.map} +0 -0
- /package/dist/chunks/{start-check-YMAUKQOU.js.map → start-check-2JJWODNG.js.map} +0 -0
- /package/dist/chunks/{upgrade-WBBH6O5R.js.map → upgrade-YVFOGNHR.js.map} +0 -0
|
@@ -2,17 +2,17 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
dispatchCliPalMessages
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-YD7KHMDW.js";
|
|
6
|
+
import "./chunk-JXAQGOHB.js";
|
|
7
7
|
import "./chunk-ANUVBWLR.js";
|
|
8
8
|
import "./chunk-ZWA2JRJV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NC5GT5ZI.js";
|
|
10
10
|
import {
|
|
11
11
|
cliPalCommunicationPolicy,
|
|
12
12
|
cliPalCommunicationStore
|
|
13
13
|
} from "./chunk-HG6MH3OH.js";
|
|
14
14
|
import "./chunk-VGPWLUQF.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-BVSMAMQU.js";
|
|
16
16
|
import "./chunk-O6TU3NIP.js";
|
|
17
17
|
import "./chunk-45IW5SXC.js";
|
|
18
18
|
import "./chunk-NLBRNFW3.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-6ZOD3GVR.js";
|
|
|
21
21
|
import "./chunk-B5WR5IF6.js";
|
|
22
22
|
import "./chunk-3JK34H57.js";
|
|
23
23
|
import "./chunk-YD7Y5T7K.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-IRUUF5QR.js";
|
|
25
25
|
import "./chunk-WHODOMXA.js";
|
|
26
26
|
import "./chunk-YOWYTBJS.js";
|
|
27
27
|
import "./chunk-2IPDTDB3.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./chunk-Y7B67G22.js";
|
|
39
39
|
import "./chunk-GNBMKISG.js";
|
|
40
40
|
import "./chunk-VBGOWIVL.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-XZWVGQYH.js";
|
|
42
42
|
import {
|
|
43
43
|
createFormatter
|
|
44
44
|
} from "./chunk-KONYGNG6.js";
|
|
@@ -190,4 +190,4 @@ __name(runPalMessageCommand, "runPalMessageCommand");
|
|
|
190
190
|
export {
|
|
191
191
|
runPalMessageCommand
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=message-command-
|
|
193
|
+
//# sourceMappingURL=message-command-5C6IA2PX.js.map
|
|
@@ -123,11 +123,11 @@ function createPalCommand(resumeCommand) {
|
|
|
123
123
|
rest
|
|
124
124
|
);
|
|
125
125
|
if (verb === "grant" || verb === "revoke" || verb === "inbox" || verb === "dispatch")
|
|
126
|
-
return (await import("./message-command-
|
|
126
|
+
return (await import("./message-command-5C6IA2PX.js")).runPalMessageCommand(ctx, verb, rest);
|
|
127
127
|
if (verb === "chat") {
|
|
128
128
|
const [id, ...args] = rest;
|
|
129
129
|
if (!id) throw new Error("A Pal id is required.");
|
|
130
|
-
return (await import("./chat-
|
|
130
|
+
return (await import("./chat-DXPIIYP5.js")).runPalChat(ctx, id, args, {
|
|
131
131
|
resumeCommand
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -202,4 +202,4 @@ export {
|
|
|
202
202
|
createPalCommand,
|
|
203
203
|
palCommand
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=pal-
|
|
205
|
+
//# sourceMappingURL=pal-VEA2XW4R.js.map
|
|
@@ -2,7 +2,7 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
runLearningCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J2UG66BV.js";
|
|
6
6
|
import {
|
|
7
7
|
decideHeadlessTrust
|
|
8
8
|
} from "./chunk-TVT2HS3D.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
ConfigLoadError,
|
|
21
21
|
ConfigValueError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XZWVGQYH.js";
|
|
23
23
|
import "./chunk-KONYGNG6.js";
|
|
24
24
|
import "./chunk-LCGXWCVU.js";
|
|
25
25
|
import "./chunk-GMUWAUKQ.js";
|
|
@@ -923,7 +923,7 @@ var residentCommand = {
|
|
|
923
923
|
throw new Error(
|
|
924
924
|
"Resident execution directory no longer belongs to its bound project and tenant."
|
|
925
925
|
);
|
|
926
|
-
const { createResidentSessionStep } = await import("./session-step-
|
|
926
|
+
const { createResidentSessionStep } = await import("./session-step-7KH6LKZW.js");
|
|
927
927
|
const verification = flags.verification ? await loadResidentVerification(flags.verification, resident.cwd) : void 0;
|
|
928
928
|
const step = createResidentSessionStep({
|
|
929
929
|
agenda: resident.agenda,
|
|
@@ -1039,4 +1039,4 @@ export {
|
|
|
1039
1039
|
residentCommand,
|
|
1040
1040
|
residentStatus
|
|
1041
1041
|
};
|
|
1042
|
-
//# sourceMappingURL=resident-
|
|
1042
|
+
//# sourceMappingURL=resident-OHM7RGYD.js.map
|
|
@@ -81,10 +81,10 @@ var scheduleCommand = {
|
|
|
81
81
|
help: SCHEDULE_HELP,
|
|
82
82
|
handler: withTerminationHandling(async ({ ctx, rawArgs }, termination) => {
|
|
83
83
|
const [verb, ...rest] = rawArgs;
|
|
84
|
-
const add = /* @__PURE__ */ __name(() => import("./add-
|
|
85
|
-
const list = /* @__PURE__ */ __name(() => import("./list-
|
|
86
|
-
const lifecycle = /* @__PURE__ */ __name(() => import("./lifecycle-
|
|
87
|
-
const service = /* @__PURE__ */ __name(() => import("./service-
|
|
84
|
+
const add = /* @__PURE__ */ __name(() => import("./add-KVRGXPPT.js"), "add");
|
|
85
|
+
const list = /* @__PURE__ */ __name(() => import("./list-GBFUOWMJ.js"), "list");
|
|
86
|
+
const lifecycle = /* @__PURE__ */ __name(() => import("./lifecycle-L2BR7PZQ.js"), "lifecycle");
|
|
87
|
+
const service = /* @__PURE__ */ __name(() => import("./service-PDZFN4KY.js"), "service");
|
|
88
88
|
switch (verb) {
|
|
89
89
|
case "add":
|
|
90
90
|
return (await add()).addCommand(ctx, rest);
|
|
@@ -140,4 +140,4 @@ export {
|
|
|
140
140
|
SCHEDULE_HELP,
|
|
141
141
|
scheduleCommand
|
|
142
142
|
};
|
|
143
|
-
//# sourceMappingURL=schedule-
|
|
143
|
+
//# sourceMappingURL=schedule-ILFE3JJQ.js.map
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
selectDesktopBackend,
|
|
5
|
+
sendDesktopNotification
|
|
6
|
+
} from "./chunk-6CO3EL6W.js";
|
|
3
7
|
import {
|
|
4
8
|
EXIT_STOP_REQUESTED,
|
|
5
9
|
ScheduleDaemon,
|
|
@@ -14,9 +18,9 @@ import {
|
|
|
14
18
|
spawnFireProcess,
|
|
15
19
|
stopRequestPath,
|
|
16
20
|
writeRunResult
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VSXHM53L.js";
|
|
18
22
|
import "./chunk-E5VLANCO.js";
|
|
19
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-6Q3EYVF6.js";
|
|
20
24
|
import {
|
|
21
25
|
flag,
|
|
22
26
|
has,
|
|
@@ -24,7 +28,7 @@ import {
|
|
|
24
28
|
parseMs,
|
|
25
29
|
pathsFor
|
|
26
30
|
} from "./chunk-RH7CN6ME.js";
|
|
27
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-RQPWIXDZ.js";
|
|
28
32
|
import {
|
|
29
33
|
parkedRunWords,
|
|
30
34
|
resumeCommand
|
|
@@ -46,8 +50,7 @@ import {
|
|
|
46
50
|
writeManifest
|
|
47
51
|
} from "./chunk-AK2U3N2A.js";
|
|
48
52
|
import {
|
|
49
|
-
listJobs
|
|
50
|
-
sanitizeLine
|
|
53
|
+
listJobs
|
|
51
54
|
} from "./chunk-SKKWMMFP.js";
|
|
52
55
|
import "./chunk-A22MBIYU.js";
|
|
53
56
|
import "./chunk-OEW7CJKK.js";
|
|
@@ -63,7 +66,7 @@ import {
|
|
|
63
66
|
} from "./chunk-HE7WUOX2.js";
|
|
64
67
|
import {
|
|
65
68
|
loadBootstrapConfigWithProvenance
|
|
66
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XZWVGQYH.js";
|
|
67
70
|
import "./chunk-KONYGNG6.js";
|
|
68
71
|
import "./chunk-LCGXWCVU.js";
|
|
69
72
|
import "./chunk-GMUWAUKQ.js";
|
|
@@ -110,251 +113,10 @@ import {
|
|
|
110
113
|
|
|
111
114
|
// src/schedule/commands/service.ts
|
|
112
115
|
import { randomUUID } from "node:crypto";
|
|
113
|
-
import { existsSync as
|
|
114
|
-
import { dirname as dirname3, join as
|
|
116
|
+
import { existsSync as existsSync4, readFileSync, realpathSync, rmSync as rmSync4 } from "node:fs";
|
|
117
|
+
import { dirname as dirname3, join as join5 } from "node:path";
|
|
115
118
|
import { fileURLToPath } from "node:url";
|
|
116
119
|
|
|
117
|
-
// src/integrations/notifications/desktop.ts
|
|
118
|
-
import { execFile } from "node:child_process";
|
|
119
|
-
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
120
|
-
import { join } from "node:path";
|
|
121
|
-
|
|
122
|
-
// src/integrations/notifications/desktop/freedesktop.ts
|
|
123
|
-
function gvariantString(text) {
|
|
124
|
-
return `'${text.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`;
|
|
125
|
-
}
|
|
126
|
-
__name(gvariantString, "gvariantString");
|
|
127
|
-
function notifySendArguments(title, body) {
|
|
128
|
-
return ["--app-name=namzu", "--", title, body];
|
|
129
|
-
}
|
|
130
|
-
__name(notifySendArguments, "notifySendArguments");
|
|
131
|
-
function gdbusArguments(title, body) {
|
|
132
|
-
return [
|
|
133
|
-
"call",
|
|
134
|
-
"--session",
|
|
135
|
-
"--dest",
|
|
136
|
-
"org.freedesktop.Notifications",
|
|
137
|
-
"--object-path",
|
|
138
|
-
"/org/freedesktop/Notifications",
|
|
139
|
-
"--method",
|
|
140
|
-
"org.freedesktop.Notifications.Notify",
|
|
141
|
-
gvariantString("namzu"),
|
|
142
|
-
"0",
|
|
143
|
-
gvariantString(""),
|
|
144
|
-
gvariantString(title),
|
|
145
|
-
gvariantString(body),
|
|
146
|
-
"[]",
|
|
147
|
-
"{}",
|
|
148
|
-
"10000"
|
|
149
|
-
];
|
|
150
|
-
}
|
|
151
|
-
__name(gdbusArguments, "gdbusArguments");
|
|
152
|
-
|
|
153
|
-
// src/integrations/notifications/desktop/macos.ts
|
|
154
|
-
function osascriptArguments(title, body) {
|
|
155
|
-
return [
|
|
156
|
-
"-e",
|
|
157
|
-
"on run argv",
|
|
158
|
-
"-e",
|
|
159
|
-
"display notification (item 2 of argv) with title (item 1 of argv)",
|
|
160
|
-
"-e",
|
|
161
|
-
"end run",
|
|
162
|
-
title,
|
|
163
|
-
body
|
|
164
|
-
];
|
|
165
|
-
}
|
|
166
|
-
__name(osascriptArguments, "osascriptArguments");
|
|
167
|
-
|
|
168
|
-
// src/integrations/notifications/desktop/windows-toast.ts
|
|
169
|
-
var TOAST_SCRIPT = [
|
|
170
|
-
"$ErrorActionPreference = 'Stop'",
|
|
171
|
-
"[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null",
|
|
172
|
-
"[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null",
|
|
173
|
-
"$title = [Security.SecurityElement]::Escape([string]$env:NAMZU_NOTIFY_TITLE)",
|
|
174
|
-
"$body = [Security.SecurityElement]::Escape([string]$env:NAMZU_NOTIFY_BODY)",
|
|
175
|
-
"$xml = New-Object Windows.Data.Xml.Dom.XmlDocument",
|
|
176
|
-
`$xml.LoadXml('<toast><visual><binding template="ToastGeneric"><text>' + $title + '</text><text>' + $body + '</text></binding></visual></toast>')`,
|
|
177
|
-
"$app = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe'",
|
|
178
|
-
"[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($app).Show([Windows.UI.Notifications.ToastNotification]::new($xml))"
|
|
179
|
-
].join("\n");
|
|
180
|
-
function encodedToastScript() {
|
|
181
|
-
return Buffer.from(TOAST_SCRIPT, "utf16le").toString("base64");
|
|
182
|
-
}
|
|
183
|
-
__name(encodedToastScript, "encodedToastScript");
|
|
184
|
-
function toastArguments() {
|
|
185
|
-
return [
|
|
186
|
-
"-NoProfile",
|
|
187
|
-
"-NonInteractive",
|
|
188
|
-
"-ExecutionPolicy",
|
|
189
|
-
"Bypass",
|
|
190
|
-
"-EncodedCommand",
|
|
191
|
-
encodedToastScript()
|
|
192
|
-
];
|
|
193
|
-
}
|
|
194
|
-
__name(toastArguments, "toastArguments");
|
|
195
|
-
function toastEnvironment(base, title, body, wsl) {
|
|
196
|
-
const env = { ...base, NAMZU_NOTIFY_TITLE: title, NAMZU_NOTIFY_BODY: body };
|
|
197
|
-
if (wsl) {
|
|
198
|
-
const existing = (base.WSLENV ?? "").split(":").filter((v) => v && !v.startsWith("NAMZU_NOTIFY_"));
|
|
199
|
-
env.WSLENV = [...existing, "NAMZU_NOTIFY_TITLE", "NAMZU_NOTIFY_BODY"].join(":");
|
|
200
|
-
}
|
|
201
|
-
return env;
|
|
202
|
-
}
|
|
203
|
-
__name(toastEnvironment, "toastEnvironment");
|
|
204
|
-
|
|
205
|
-
// src/integrations/notifications/desktop.ts
|
|
206
|
-
function readOsRelease() {
|
|
207
|
-
try {
|
|
208
|
-
return readFileSync("/proc/sys/kernel/osrelease", "utf8");
|
|
209
|
-
} catch {
|
|
210
|
-
return void 0;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
__name(readOsRelease, "readOsRelease");
|
|
214
|
-
function whichOnPath(env, exists) {
|
|
215
|
-
return (name) => {
|
|
216
|
-
for (const dir of (env.PATH ?? "").split(":")) {
|
|
217
|
-
if (!dir || dir.startsWith("/mnt/")) continue;
|
|
218
|
-
const candidate = join(dir, name);
|
|
219
|
-
if (exists(candidate)) return candidate;
|
|
220
|
-
}
|
|
221
|
-
return void 0;
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
__name(whichOnPath, "whichOnPath");
|
|
225
|
-
var WSL_RUN_DIR = "/run/WSL";
|
|
226
|
-
function listInteropSockets() {
|
|
227
|
-
const sockets = [];
|
|
228
|
-
let names;
|
|
229
|
-
try {
|
|
230
|
-
names = readdirSync(WSL_RUN_DIR);
|
|
231
|
-
} catch {
|
|
232
|
-
return sockets;
|
|
233
|
-
}
|
|
234
|
-
for (const name of names) {
|
|
235
|
-
if (!/^\d+_interop$/.test(name)) continue;
|
|
236
|
-
const path = join(WSL_RUN_DIR, name);
|
|
237
|
-
try {
|
|
238
|
-
const stat = statSync(path);
|
|
239
|
-
if (stat.isSocket()) sockets.push({ path, mtimeMs: stat.mtimeMs });
|
|
240
|
-
} catch {
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
return sockets;
|
|
244
|
-
}
|
|
245
|
-
__name(listInteropSockets, "listInteropSockets");
|
|
246
|
-
function findInteropSocket(sockets) {
|
|
247
|
-
const stable = sockets.find((socket) => socket.path === join(WSL_RUN_DIR, "1_interop"));
|
|
248
|
-
if (stable) return stable.path;
|
|
249
|
-
return [...sockets].sort((a, b) => b.mtimeMs - a.mtimeMs)[0]?.path;
|
|
250
|
-
}
|
|
251
|
-
__name(findInteropSocket, "findInteropSocket");
|
|
252
|
-
function selectDesktopBackend(probe = {}) {
|
|
253
|
-
const platform = probe.platform ?? process.platform;
|
|
254
|
-
const env = probe.env ?? process.env;
|
|
255
|
-
const exists = probe.exists ?? existsSync;
|
|
256
|
-
const which = probe.which ?? whichOnPath(env, exists);
|
|
257
|
-
if (platform === "darwin") {
|
|
258
|
-
return {
|
|
259
|
-
kind: "macos",
|
|
260
|
-
detail: "osascript",
|
|
261
|
-
command: "/usr/bin/osascript",
|
|
262
|
-
args: osascriptArguments
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
if (platform === "win32") {
|
|
266
|
-
return {
|
|
267
|
-
kind: "windows-toast",
|
|
268
|
-
detail: "powershell.exe",
|
|
269
|
-
command: "powershell.exe",
|
|
270
|
-
args: /* @__PURE__ */ __name(() => toastArguments(), "args"),
|
|
271
|
-
env: /* @__PURE__ */ __name((base, title, body) => toastEnvironment(base, title, body, false), "env")
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
const mountRoot = probe.mountRoot ?? readWslMountRoot();
|
|
275
|
-
const wsl = detectWsl(env, { exists, list: /* @__PURE__ */ __name(() => [], "list"), mountRoot });
|
|
276
|
-
const wslKernel = !wsl && /microsoft/i.test((probe.osRelease ?? readOsRelease)() ?? "");
|
|
277
|
-
if (wsl || wslKernel) {
|
|
278
|
-
const enabled = wsl?.interop ?? exists("/proc/sys/fs/binfmt_misc/WSLInterop");
|
|
279
|
-
const socket = enabled ? env.WSL_INTEROP || findInteropSocket((probe.interopSockets ?? listInteropSockets)()) : void 0;
|
|
280
|
-
if (!socket) {
|
|
281
|
-
return {
|
|
282
|
-
kind: "none",
|
|
283
|
-
detail: enabled ? "WSL interop is not available to this process (no WSL_INTEROP and no interop socket under /run/WSL), so Windows notifications cannot be shown" : "WSL interop is disabled ([interop] enabled=false in /etc/wsl.conf), so Windows notifications cannot be shown"
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
const powershell = probe.powershell ?? `${wslSystem32(mountRoot)}/WindowsPowerShell/v1.0/powershell.exe`;
|
|
287
|
-
if (!exists(powershell)) return { kind: "none", detail: `${powershell} was not found` };
|
|
288
|
-
const found = env.WSL_INTEROP ? void 0 : socket;
|
|
289
|
-
return {
|
|
290
|
-
kind: "wsl-toast",
|
|
291
|
-
detail: found ? `${powershell} (interop through ${found})` : powershell,
|
|
292
|
-
command: powershell,
|
|
293
|
-
args: /* @__PURE__ */ __name(() => toastArguments(), "args"),
|
|
294
|
-
env: /* @__PURE__ */ __name((base, title, body) => ({
|
|
295
|
-
...toastEnvironment(base, title, body, true),
|
|
296
|
-
...found ? { WSL_INTEROP: found } : {}
|
|
297
|
-
}), "env"),
|
|
298
|
-
cwd: `${mountRoot}c`
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
const bus = env.DBUS_SESSION_BUS_ADDRESS || (env.XDG_RUNTIME_DIR && exists(join(env.XDG_RUNTIME_DIR, "bus")) ? "runtime-bus" : "");
|
|
302
|
-
if (!bus)
|
|
303
|
-
return { kind: "none", detail: "no desktop session bus (DBUS_SESSION_BUS_ADDRESS is unset)" };
|
|
304
|
-
const notifySend = which("notify-send");
|
|
305
|
-
if (notifySend)
|
|
306
|
-
return {
|
|
307
|
-
kind: "freedesktop",
|
|
308
|
-
detail: notifySend,
|
|
309
|
-
command: notifySend,
|
|
310
|
-
args: notifySendArguments
|
|
311
|
-
};
|
|
312
|
-
const gdbus = which("gdbus");
|
|
313
|
-
if (gdbus) return { kind: "freedesktop", detail: gdbus, command: gdbus, args: gdbusArguments };
|
|
314
|
-
return { kind: "none", detail: "neither notify-send nor gdbus is installed" };
|
|
315
|
-
}
|
|
316
|
-
__name(selectDesktopBackend, "selectDesktopBackend");
|
|
317
|
-
var defaultSpawn = /* @__PURE__ */ __name((command, args, options) => new Promise((resolve2) => {
|
|
318
|
-
execFile(
|
|
319
|
-
command,
|
|
320
|
-
[...args],
|
|
321
|
-
{
|
|
322
|
-
env: options.env,
|
|
323
|
-
...options.cwd ? { cwd: options.cwd } : {},
|
|
324
|
-
timeout: options.timeoutMs,
|
|
325
|
-
windowsHide: true
|
|
326
|
-
},
|
|
327
|
-
(error, _stdout, stderr) => {
|
|
328
|
-
const code = error ? typeof error.code === "number" ? error.code : 1 : 0;
|
|
329
|
-
resolve2({ code, stderr: String(stderr ?? "").slice(0, 500) });
|
|
330
|
-
}
|
|
331
|
-
);
|
|
332
|
-
}), "defaultSpawn");
|
|
333
|
-
async function sendDesktopNotification(backend, notification, options = {}) {
|
|
334
|
-
if (backend.kind === "none" || !backend.command || !backend.args) {
|
|
335
|
-
return { kind: "unavailable", detail: backend.detail };
|
|
336
|
-
}
|
|
337
|
-
const title = sanitizeLine(notification.title, 64);
|
|
338
|
-
const body = sanitizeLine(notification.body, 200);
|
|
339
|
-
const base = options.env ?? process.env;
|
|
340
|
-
const env = backend.env ? backend.env(base, title, body) : base;
|
|
341
|
-
try {
|
|
342
|
-
const result = await (options.spawn ?? defaultSpawn)(
|
|
343
|
-
backend.command,
|
|
344
|
-
backend.args(title, body),
|
|
345
|
-
{
|
|
346
|
-
env,
|
|
347
|
-
...backend.cwd ? { cwd: backend.cwd } : {},
|
|
348
|
-
timeoutMs: 15e3
|
|
349
|
-
}
|
|
350
|
-
);
|
|
351
|
-
return result.code === 0 ? { kind: "sent" } : { kind: "failed", detail: result.stderr || `exit ${String(result.code)}` };
|
|
352
|
-
} catch (error) {
|
|
353
|
-
return { kind: "failed", detail: error instanceof Error ? error.message : String(error) };
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
__name(sendDesktopNotification, "sendDesktopNotification");
|
|
357
|
-
|
|
358
120
|
// src/schedule/service/detect.ts
|
|
359
121
|
function detectPlatform(options = {}) {
|
|
360
122
|
const platform = options.platform ?? process.platform;
|
|
@@ -375,12 +137,12 @@ __name(detectPlatform, "detectPlatform");
|
|
|
375
137
|
// src/schedule/service/index.ts
|
|
376
138
|
import { mkdirSync as mkdirSync3, rmSync as rmSync3, rmdirSync, writeFileSync as writeFileSync3 } from "node:fs";
|
|
377
139
|
import { userInfo } from "node:os";
|
|
378
|
-
import { isAbsolute, join as
|
|
140
|
+
import { isAbsolute, join as join3 } from "node:path";
|
|
379
141
|
|
|
380
142
|
// src/schedule/service/launchd.ts
|
|
381
|
-
import { existsSync
|
|
143
|
+
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
382
144
|
import { homedir } from "node:os";
|
|
383
|
-
import { dirname, join
|
|
145
|
+
import { dirname, join } from "node:path";
|
|
384
146
|
|
|
385
147
|
// src/schedule/service/quote.ts
|
|
386
148
|
function systemdWord(text) {
|
|
@@ -432,12 +194,12 @@ function launchdLabel(name) {
|
|
|
432
194
|
}
|
|
433
195
|
__name(launchdLabel, "launchdLabel");
|
|
434
196
|
function launchdPlistPath(label, home = homedir()) {
|
|
435
|
-
return
|
|
197
|
+
return join(home, "Library", "LaunchAgents", `${label}.plist`);
|
|
436
198
|
}
|
|
437
199
|
__name(launchdPlistPath, "launchdPlistPath");
|
|
438
200
|
function launchdPlist(label, program2) {
|
|
439
201
|
const args = [program2.node, program2.bin, "schedule", "daemon", "--home", program2.namzuHome];
|
|
440
|
-
const log =
|
|
202
|
+
const log = join(program2.namzuHome, "schedule", "daemon");
|
|
441
203
|
return [
|
|
442
204
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
443
205
|
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
|
|
@@ -467,9 +229,9 @@ function launchdPlist(label, program2) {
|
|
|
467
229
|
" <key>LimitLoadToSessionType</key>",
|
|
468
230
|
" <string>Aqua</string>",
|
|
469
231
|
" <key>StandardOutPath</key>",
|
|
470
|
-
` <string>${xmlText(
|
|
232
|
+
` <string>${xmlText(join(log, "launchd.out.log"))}</string>`,
|
|
471
233
|
" <key>StandardErrorPath</key>",
|
|
472
|
-
` <string>${xmlText(
|
|
234
|
+
` <string>${xmlText(join(log, "launchd.err.log"))}</string>`,
|
|
473
235
|
"</dict>",
|
|
474
236
|
"</plist>",
|
|
475
237
|
""
|
|
@@ -491,7 +253,7 @@ async function uninstallLaunchd(label, domain, steps, plistPath = launchdPlistPa
|
|
|
491
253
|
await steps.run("launchctl", ["bootout", `${domain}/${label}`]);
|
|
492
254
|
rmSync(plistPath, { force: true });
|
|
493
255
|
const problems = [];
|
|
494
|
-
if (
|
|
256
|
+
if (existsSync(plistPath)) problems.push(`${plistPath} is still there`);
|
|
495
257
|
const printed = await steps.run("launchctl", ["print", `${domain}/${label}`]);
|
|
496
258
|
if (printed.code === 0) problems.push(`${label} is still loaded in ${domain}`);
|
|
497
259
|
return problems;
|
|
@@ -499,12 +261,12 @@ async function uninstallLaunchd(label, domain, steps, plistPath = launchdPlistPa
|
|
|
499
261
|
__name(uninstallLaunchd, "uninstallLaunchd");
|
|
500
262
|
|
|
501
263
|
// src/schedule/service/systemd.ts
|
|
502
|
-
import { existsSync as
|
|
264
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
503
265
|
import { homedir as homedir2 } from "node:os";
|
|
504
|
-
import { dirname as dirname2, join as
|
|
266
|
+
import { dirname as dirname2, join as join2 } from "node:path";
|
|
505
267
|
function systemdUnitPath(name, env = process.env, home = homedir2()) {
|
|
506
|
-
const config = env.XDG_CONFIG_HOME ||
|
|
507
|
-
return
|
|
268
|
+
const config = env.XDG_CONFIG_HOME || join2(home, ".config");
|
|
269
|
+
return join2(config, "systemd", "user", `${name}.service`);
|
|
508
270
|
}
|
|
509
271
|
__name(systemdUnitPath, "systemdUnitPath");
|
|
510
272
|
function systemdUnit(program2) {
|
|
@@ -555,7 +317,7 @@ async function uninstallSystemd(name, steps, unitPath = systemdUnitPath(name)) {
|
|
|
555
317
|
rmSync2(unitPath, { force: true });
|
|
556
318
|
await systemctl(steps, "daemon-reload");
|
|
557
319
|
await systemctl(steps, "reset-failed", `${name}.service`);
|
|
558
|
-
if (
|
|
320
|
+
if (existsSync2(unitPath)) problems.push(`${unitPath} is still there`);
|
|
559
321
|
const shown = await systemctl(steps, "show", `${name}.service`, "--property=LoadState");
|
|
560
322
|
if (shown.code === 0 && /LoadState=loaded/.test(shown.stdout))
|
|
561
323
|
problems.push(`${name}.service is still loaded`);
|
|
@@ -578,7 +340,7 @@ async function stopSystemd(name, steps) {
|
|
|
578
340
|
}
|
|
579
341
|
__name(stopSystemd, "stopSystemd");
|
|
580
342
|
async function systemdUserAvailable(steps) {
|
|
581
|
-
if (!
|
|
343
|
+
if (!existsSync2("/run/systemd/system")) return false;
|
|
582
344
|
const result = await systemctl(steps, "show-environment");
|
|
583
345
|
return result.code === 0;
|
|
584
346
|
}
|
|
@@ -736,7 +498,7 @@ function parseTaskQuery(output) {
|
|
|
736
498
|
__name(parseTaskQuery, "parseTaskQuery");
|
|
737
499
|
|
|
738
500
|
// src/schedule/service/wsl.ts
|
|
739
|
-
import { existsSync as
|
|
501
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
740
502
|
var DEFAULT_SYSTEM32 = wslSystem32();
|
|
741
503
|
function windowsTools(system32 = wslSystem32(readWslMountRoot())) {
|
|
742
504
|
const systemRoot = system32.replace(/\/System32$/i, "");
|
|
@@ -755,9 +517,9 @@ function windowsTools(system32 = wslSystem32(readWslMountRoot())) {
|
|
|
755
517
|
}
|
|
756
518
|
__name(windowsTools, "windowsTools");
|
|
757
519
|
async function probeInterop(run, tools, env = process.env) {
|
|
758
|
-
if (!
|
|
520
|
+
if (!existsSync3(tools.cmd))
|
|
759
521
|
return { ok: false, reason: `${tools.cmd} was not found (is C: mounted at ${tools.drive}?)` };
|
|
760
|
-
if (!env.WSL_INTEROP && !
|
|
522
|
+
if (!env.WSL_INTEROP && !existsSync3("/proc/sys/fs/binfmt_misc/WSLInterop")) {
|
|
761
523
|
return {
|
|
762
524
|
ok: false,
|
|
763
525
|
reason: "WSL interop is disabled ([interop] enabled=false in /etc/wsl.conf)"
|
|
@@ -949,7 +711,7 @@ async function installService(ctx, request) {
|
|
|
949
711
|
request.program.namzuHome
|
|
950
712
|
]
|
|
951
713
|
});
|
|
952
|
-
const file =
|
|
714
|
+
const file = join3(paths.daemon, `${request.name}.task.xml`);
|
|
953
715
|
mkdirSync3(paths.daemon, { recursive: true });
|
|
954
716
|
writeFileSync3(file, taskXmlBytes(xml));
|
|
955
717
|
const problems = [];
|
|
@@ -998,7 +760,7 @@ async function installService(ctx, request) {
|
|
|
998
760
|
if (!linuxDir.startsWith(tools.mountRoot))
|
|
999
761
|
throw new ServiceRefusal(`could not map ${localAppData} into WSL`);
|
|
1000
762
|
mkdirSync3(linuxDir, { recursive: true });
|
|
1001
|
-
const linuxFile =
|
|
763
|
+
const linuxFile = join3(linuxDir, `${name}.xml`);
|
|
1002
764
|
writeFileSync3(linuxFile, taskXmlBytes(taskXml(definition)));
|
|
1003
765
|
const problems = [];
|
|
1004
766
|
try {
|
|
@@ -1176,10 +938,10 @@ __name(stopService, "stopService");
|
|
|
1176
938
|
// src/schedule/service/names.ts
|
|
1177
939
|
import { createHash } from "node:crypto";
|
|
1178
940
|
import { homedir as homedir3 } from "node:os";
|
|
1179
|
-
import { join as
|
|
941
|
+
import { join as join4, resolve } from "node:path";
|
|
1180
942
|
var SERVICE_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,62}$/;
|
|
1181
943
|
function defaultServiceName(namzuHome, osHome = homedir3()) {
|
|
1182
|
-
if (resolve(namzuHome) === resolve(
|
|
944
|
+
if (resolve(namzuHome) === resolve(join4(osHome, ".namzu"))) return "namzu-scheduler";
|
|
1183
945
|
const h8 = createHash("sha256").update(resolve(namzuHome)).digest("hex").slice(0, 8);
|
|
1184
946
|
return `namzu-scheduler-${h8}`;
|
|
1185
947
|
}
|
|
@@ -1195,9 +957,9 @@ function checkServiceName(name) {
|
|
|
1195
957
|
__name(checkServiceName, "checkServiceName");
|
|
1196
958
|
|
|
1197
959
|
// src/schedule/service/runner.ts
|
|
1198
|
-
import { execFile
|
|
960
|
+
import { execFile } from "node:child_process";
|
|
1199
961
|
var runCommand = /* @__PURE__ */ __name((command, args, options = {}) => new Promise((resolve2) => {
|
|
1200
|
-
|
|
962
|
+
execFile(
|
|
1201
963
|
command,
|
|
1202
964
|
[...args],
|
|
1203
965
|
{
|
|
@@ -1233,7 +995,7 @@ var PLATFORMS = [
|
|
|
1233
995
|
];
|
|
1234
996
|
function installedBin() {
|
|
1235
997
|
const here = dirname3(fileURLToPath(new URL("../", import.meta.url).href + "schedule/commands/service.js"));
|
|
1236
|
-
const candidate =
|
|
998
|
+
const candidate = join5(here, "..", "..", "bin.js");
|
|
1237
999
|
try {
|
|
1238
1000
|
return realpathSync(candidate);
|
|
1239
1001
|
} catch {
|
|
@@ -1385,7 +1147,7 @@ ${problems.join("\n")}` });
|
|
|
1385
1147
|
__name(uninstallCommand, "uninstallCommand");
|
|
1386
1148
|
function readHeartbeat(paths) {
|
|
1387
1149
|
try {
|
|
1388
|
-
return JSON.parse(
|
|
1150
|
+
return JSON.parse(readFileSync(paths.heartbeat, "utf8"));
|
|
1389
1151
|
} catch {
|
|
1390
1152
|
return void 0;
|
|
1391
1153
|
}
|
|
@@ -1548,7 +1310,7 @@ async function daemonCommand(ctx, argv) {
|
|
|
1548
1310
|
manifest?.windows?.powershell ? { powershell: manifest.windows.powershell } : {}
|
|
1549
1311
|
);
|
|
1550
1312
|
const bin = installedBin();
|
|
1551
|
-
if (
|
|
1313
|
+
if (existsSync4(stopRequestPath(paths))) {
|
|
1552
1314
|
ctx.formatter.error({
|
|
1553
1315
|
message: `the scheduler for ${paths.home} was stopped with \`namzu schedule stop\`; \`namzu schedule start\` lets it run again`
|
|
1554
1316
|
});
|
|
@@ -1643,4 +1405,4 @@ export {
|
|
|
1643
1405
|
statusCommand,
|
|
1644
1406
|
uninstallCommand
|
|
1645
1407
|
};
|
|
1646
|
-
//# sourceMappingURL=service-
|
|
1408
|
+
//# sourceMappingURL=service-PDZFN4KY.js.map
|