All files / core/blong-gogo/src/adapter/server/engine engineSessionClose.ts

42.85% Statements 9/21
100% Branches 0/0
100% Functions 0/0
42.85% Lines 9/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221x 1x 1x 1x 1x 1x 1x 1x 1x                          
import {handler} from '@feasibleone/blong/types';
 
/**
 * `engine.session.close` — release what the account holds.
 *
 * Called in `finally`, so a failed session never leaves a scripted cursor or a harness subprocess
 * behind (`@@D-708`).
 */
export default handler(() => ({
    async engineSessionClose(
        params: {account: string; workspacePath?: string},
        _$meta: unknown,
    ): Promise<{closed: boolean}> {
        const self = this as unknown as {
            engineClose: (request: {account: string; workspacePath?: string}) => Promise<{
                closed: boolean;
            }>;
        };
        return self.engineClose(params);
    },
}));