This commit is contained in:
tree 2022-06-02 23:45:11 +02:00
rodič ce1ef566b3
revize 0628ff0b26
2 změnil soubory, kde provedl 30 přidání a 0 odebrání

Zobrazit soubor

@ -70,6 +70,9 @@ changelog:
tags:
deno run --unstable --allow-read utils/tags.js
qa-summary:
deno run --unstable --allow-read utils/exec.js qaSummary
schedule: plan
plan:

Zobrazit soubor

@ -160,6 +160,10 @@ export class UTXOEngine {
},
);
// write QA output of events (schedules)
const qa = this.qaSummary(entryId);
await this._jsonWrite([entryDir, "qa-summary.json"], qa);
// done
entriesIndex.push({
@ -198,6 +202,29 @@ export class UTXOEngine {
}
}
qaSummary(entry) {
const arr = [];
for (
const ev of this.entries[entry].specs.events.filter((ev) =>
ev.type !== "lightning"
)
) {
const s = this.entries[entry].specs.schedule.find((s) =>
s.event === ev.id
);
if (!s) {
throw new Error(`Schedule not found (?): ${ev.id}`);
}
arr.push({
id: s.id,
eventId: ev.id,
name: ev.name,
period: s.period,
});
}
return arr;
}
schemaUrl(version = "1", type = "index") {
return `${baseUrl}/schema/${version}/${type}.json`;
}