diff --git a/packages/cli/src/utils/processUtils.test.ts b/packages/cli/src/utils/processUtils.test.ts index e633825d55..a79f93a2b1 100644 --- a/packages/cli/src/utils/processUtils.test.ts +++ b/packages/cli/src/utils/processUtils.test.ts @@ -37,7 +37,7 @@ describe('processUtils', () => { expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1); expect(runExitCleanup).toHaveBeenCalledTimes(1); expect(process.send).toHaveBeenCalledWith({ - type: 'relaunch-resume-session', + type: 'relaunch-session', sessionId: expect.any(String), }); expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE); @@ -53,7 +53,7 @@ describe('processUtils', () => { expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1); expect(runExitCleanup).toHaveBeenCalledTimes(1); expect(process.send).toHaveBeenCalledWith({ - type: 'relaunch-resume-session', + type: 'relaunch-session', sessionId: 'custom-session-id', }); expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE); diff --git a/packages/cli/src/utils/processUtils.ts b/packages/cli/src/utils/processUtils.ts index fd2886c30d..3c2ce1a1f8 100644 --- a/packages/cli/src/utils/processUtils.ts +++ b/packages/cli/src/utils/processUtils.ts @@ -31,7 +31,7 @@ export async function relaunchApp(sessionIdOverride?: string): Promise { if (process.send) { process.send({ - type: 'relaunch-resume-session', + type: 'relaunch-session', sessionId: sessionIdOverride ?? sessionId, }); } diff --git a/packages/cli/src/utils/relaunch.test.ts b/packages/cli/src/utils/relaunch.test.ts index 3497ea72fb..ba545d1876 100644 --- a/packages/cli/src/utils/relaunch.test.ts +++ b/packages/cli/src/utils/relaunch.test.ts @@ -316,7 +316,7 @@ describe('relaunchAppInChildProcess', () => { expect(processExitSpy).toHaveBeenCalledWith(1); }); - it('should append --resume on the next spawn if relaunch-resume-session message is received', async () => { + it('should append --resume on the next spawn if relaunch-session message is received', async () => { process.argv = ['/usr/bin/node', '/app/cli.js', '--some-flag']; let spawnCount = 0; @@ -328,7 +328,7 @@ describe('relaunchAppInChildProcess', () => { // First run: send the resume session ID, then exit with RELAUNCH_EXIT_CODE setImmediate(() => { mockChild.emit('message', { - type: 'relaunch-resume-session', + type: 'relaunch-session', sessionId: 'test-session-123', }); mockChild.emit('close', RELAUNCH_EXIT_CODE); @@ -378,7 +378,7 @@ describe('relaunchAppInChildProcess', () => { if (spawnCount === 1) { setImmediate(() => { mockChild.emit('message', { - type: 'relaunch-resume-session', + type: 'relaunch-session', sessionId: 'new-session-456', }); mockChild.emit('close', RELAUNCH_EXIT_CODE); diff --git a/packages/cli/src/utils/relaunch.ts b/packages/cli/src/utils/relaunch.ts index a9801c0f10..b69ee51c4c 100644 --- a/packages/cli/src/utils/relaunch.ts +++ b/packages/cli/src/utils/relaunch.ts @@ -90,7 +90,7 @@ export async function relaunchAppInChildProcess( (msg: { type?: string; settings?: unknown; sessionId?: string }) => { if (msg.type === 'admin-settings-update' && msg.settings) { latestAdminSettings = msg.settings as AdminControlsSettings; - } else if (msg.type === 'relaunch-resume-session' && msg.sessionId) { + } else if (msg.type === 'relaunch-session' && msg.sessionId) { resumeSessionId = msg.sessionId; } },