mvp progress
This commit is contained in:
parent
9b16b25187
commit
6446da7e76
75 changed files with 1865 additions and 244 deletions
|
@ -24,7 +24,10 @@ export abstract class IStackService {
|
|||
abstract init(processed: IPipeline[], path: string): void;
|
||||
}
|
||||
|
||||
export class StackService extends TypedEvent<string> implements IStackService {
|
||||
export class StackService
|
||||
extends TypedEvent<Iteration[]>
|
||||
implements IStackService
|
||||
{
|
||||
callStack: Iteration[];
|
||||
path: string;
|
||||
constructor(processed: IPipeline[], path: string) {
|
||||
|
@ -56,6 +59,7 @@ export class StackService extends TypedEvent<string> implements IStackService {
|
|||
for await (const el of this.callStack!) {
|
||||
await this.execStack(inc, el);
|
||||
inc += 1;
|
||||
this.emit(this.callStack);
|
||||
}
|
||||
}
|
||||
async execStack(
|
||||
|
@ -121,14 +125,17 @@ export class StackService extends TypedEvent<string> implements IStackService {
|
|||
return promise;
|
||||
}
|
||||
private async triggerExec(
|
||||
trigger: Trigger,
|
||||
trigger: Trigger | null,
|
||||
stackNumber: number
|
||||
): Promise<Result<boolean, boolean>> {
|
||||
const hashes = this.callStack[stackNumber].hashes;
|
||||
if (trigger !== null) {
|
||||
const hashes = this.callStack[stackNumber].hashes;
|
||||
|
||||
if (hashes != null) {
|
||||
return await new TriggerService(trigger, hashes, this.path).call();
|
||||
if (hashes != null) {
|
||||
return await new TriggerService(trigger, hashes, this.path).call();
|
||||
}
|
||||
throw new Error("Hashes is null");
|
||||
}
|
||||
throw new Error("Hashes is null");
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue