github
<a href="https://github.com/williamthome/zotonic-ls/commit/<a class=hub.com/williamthome/zotonic-ls/commit/<a class="double-link" href="https://git"><a class=hub.com/williamthome/zotonic-ls/commit/<a class="double-link" href="https://git"><a class=hub.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25355">b7306dcd6<a href="https://github.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25355">">&lt;a href=&quot;https://github.com/williamthome/zotonic-ls/commit/</a><a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25355">b7306dcd6</a><a href="https://github.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25355">&lt;a href=&quot;https://github.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5fa</a>cac25355">">Merge </a><a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/<a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/<a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/90cc3e3de27535e29d66b41ff9b9aa06816040c6">90cc3e3de</a><a href="https://github.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25355">&quot;&gt;90cc3e3de&lt;/a&gt;&quot;&gt;90cc3e3de&lt;/a&gt;&lt;a href=&quot;https://github.com/williamthome/zotonic-ls/commit/b7306dcd6cfd924d34f4531c4d7ab5facac25</a>355"> into </a><a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/<a class="double-link" href="https://github.com/williamthome/zotonic-ls/commit/3ef1d7a57">3ef1d7a57">3ef1d7a57</a>
68 of 106 branches covered (64.15%)
Branch coverage included in aggregate %.
467 of 1237 new or added lines in 46 files covered. (37.75%)
463 of 1237 relevant lines covered (37.43%)
2.61 hits per line
NEW
|
import { immutable } from '@/common/functional-programming'; |
|
NEW
|
import { AnyPromiseable } from '@/common/types'; |
× |
NEW
|
import { Command } from '@/domain/commands'; |
× |
NEW
|
|
× |
NEW
|
export function buildMainCommand(args: { commands: Array<AnyPromiseable> }) { |
× |
NEW
|
const commands = immutable(
|
× |
NEW
|
args.commands.reduce((acc, command) => { |
× |
NEW
|
Object.defineProperty(acc, command.name, { |
× |
NEW
|
value: command,
|
× |
NEW
|
}); |
× |
NEW
|
return acc;
|
× |
NEW
|
}, new Object()),
|
× |
NEW
|
); |
× |
NEW
|
|
× |
NEW
|
return async function zotonicCommand(command: Command) {
|
× |
NEW
|
await command(commands); |
× |
NEW
|
}; |
× |
NEW
|
} |
× |
NEW
|
|
× |
NEW
|
export const mainCommandName = 'zotonicCommand'; |
× |