refactor(cli): privatize internal exports (#106848)

This commit is contained in:
Peter Steinberger
2026-07-13 15:09:26 -07:00
committed by GitHub
parent 710d1eb443
commit e69df7ef22
11 changed files with 22 additions and 32 deletions

View File

@@ -20,12 +20,10 @@ vi.mock("../../daemon/launchd.js", () => ({
}));
let recoverInstalledLaunchAgent: typeof import("./launchd-recovery.js").recoverInstalledLaunchAgent;
let LAUNCH_AGENT_RECOVERY_MESSAGE: typeof import("./launchd-recovery.js").LAUNCH_AGENT_RECOVERY_MESSAGE;
describe("recoverInstalledLaunchAgent", () => {
beforeAll(async () => {
({ recoverInstalledLaunchAgent, LAUNCH_AGENT_RECOVERY_MESSAGE } =
await import("./launchd-recovery.js"));
({ recoverInstalledLaunchAgent } = await import("./launchd-recovery.js"));
});
beforeEach(() => {
@@ -57,7 +55,7 @@ describe("recoverInstalledLaunchAgent", () => {
await expect(recoverInstalledLaunchAgent({ result: "restarted" })).resolves.toEqual({
result: "restarted",
loaded: true,
message: LAUNCH_AGENT_RECOVERY_MESSAGE,
message: "Gateway LaunchAgent was installed but not loaded; re-bootstrapped launchd service.",
});
expect(launchAgentPlistExists).toHaveBeenCalledWith(process.env);
expect(repairLaunchAgentBootstrap).toHaveBeenCalledWith({ env: process.env });

View File

@@ -53,6 +53,3 @@ export async function recoverInstalledLaunchAgent(params: {
message: LAUNCH_AGENT_RECOVERY_MESSAGE,
};
}
/** User-facing recovery message for successful LaunchAgent bootstrap repair. */
export { LAUNCH_AGENT_RECOVERY_MESSAGE };