All files / demo/blong-cli cli.ts

100% Statements 26/26
100% Branches 3/3
100% Functions 1/1
100% Lines 26/26

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 22 23 24 25 26 278x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 8x  
import {server} from '@feasibleone/blong';
 
/**
 * cli.ts — the suite the `blong-cli` command runs on.
 *
 * There is deliberately no `server.ts` and no `index.ts` here: the `cli` intent
 * switches the gateway, the RPC server, the API gateway, rest-fs, system debug,
 * MCP and the watcher off, so the only thing this suite has to provide is the
 * realm. The `default` config block is what makes the loader instantiate it —
 * without a key under an active intent the child loads but contributes no ports,
 * and there would be nothing to dispatch to.
 */
export default server(() => ({
    url: import.meta.url,
    children: [
        async function text() {
            return import('./text/server.ts');
        },
    ],
    config: {
        default: {text: {}},
        // Nothing to quieten down: the framework's `cli` intent already defaults
        // logging to `warn`, precisely so a command's stdout can carry its result.
        cli: {},
    },
}));