update CLI to work in CAM mode and add working samples

This commit is contained in:
Stewart Allen 2022-10-16 12:17:35 -04:00
commit d6757d1758
9 changed files with 346 additions and 124 deletions

View file

@ -162,8 +162,10 @@ class Engine {
return new Promise((accept, reject) => {
let output = [];
kiri.client.export(this.settings, segment => {
this.listener({export:{segment}});
output.push(segment);
if (typeof segment === 'string') {
this.listener({export:{segment}});
output.push(segment);
}
}, done => {
this.listener({export:{done}});
accept(output.join('\r\n'));