Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/framework/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { FlatMapAsyncOptions, flatMapAsync, pipe, compose, map, tap, Transform,
import * as t from 'io-ts'
import { PathReporter } from 'io-ts/lib/PathReporter'
import R from "ramda";
import { watchScope } from './watch';

export function connector<
Config,
Expand All @@ -23,7 +24,7 @@ export function connector<

const executeCommands = commandExecutor(definition.resources, _scope);

return {
return watchScope({
scopeName: definition.getScopeName(config.get()),

connector,
Expand Down Expand Up @@ -79,7 +80,7 @@ export function connector<
}
}
},
}
})
}

const connector = addPropertiesToFunction(
Expand Down
9 changes: 6 additions & 3 deletions src/framework/watch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Command, ConnectorScope, OutputElement } from "./connector";
import { onEnd, tap, compose, pipe, streamJson, transformJson } from "@space48/json-pipe";
import ipc from "node-ipc";
import { MessageHeader, Path } from ".";
import { MessageHeader, Path, State } from ".";
import { encodeHeader } from './binary-api';
import { throws } from "assert";
import { time, timeStamp } from "console";
Expand All @@ -20,7 +20,7 @@ export function watchScope(scope: ConnectorScope): ConnectorScope {
} catch (e) {
progress.finish(e);
throw e
}
}
}
};
}
Expand Down Expand Up @@ -181,7 +181,10 @@ class ExecutionProgress {
};
}

recordOutput(output: unknown) {
recordOutput(output: any) {
if(State.isState(output)) {
return;
}
if (this.multiCommand) {
const outputEl = output as OutputElement;
this.getCommandProgress(outputEl).recordOutput();
Expand Down