feat: remove capability execution status markers
This commit is contained in:
1 parent
e956ec9055
commit
d22468e29f
16 files changed
+25
-73
No files matched your search
+3
-15
@@ -2,21 +2,10 @@ import { app } from "electron";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { Catalog, CatalogComponent } from "../shared/types";
|
||||
import { hasCapability } from "./engine/registry";
|
||||
|
||||
let cached: Catalog | null = null;
|
||||
let excludedIds: Set<string> | null = null;
|
||||
|
||||
const RUNTIME_CONTAINERS = new Set([
|
||||
"logic_control_if_else",
|
||||
"logic_control_count_for",
|
||||
"logic_control_array_for_v3",
|
||||
"logic_control_dictionary_for_v1",
|
||||
"logic_control_while",
|
||||
"infinite_loop",
|
||||
"logic_control_try_catch"
|
||||
]);
|
||||
|
||||
function resolveCatalogPath(): string {
|
||||
const candidates = [
|
||||
process.env.RPA_CATALOG_PATH,
|
||||
@@ -64,10 +53,9 @@ export function loadCatalog(): Catalog {
|
||||
const raw = fs.readFileSync(catalogPath(), "utf8");
|
||||
const catalog = JSON.parse(raw) as Catalog;
|
||||
const excluded = loadExcludedIds();
|
||||
catalog.components = catalog.components.filter((component) => !excluded.has(component.id)).map((component: CatalogComponent) => ({
|
||||
...component,
|
||||
implemented: RUNTIME_CONTAINERS.has(component.id) || hasCapability(component.id) || hasCapability(component.functionName)
|
||||
}));
|
||||
catalog.components = catalog.components
|
||||
.filter((component) => !excluded.has(component.id))
|
||||
.map((component: CatalogComponent) => component);
|
||||
catalog.counts.total = catalog.components.length;
|
||||
catalog.counts.vendor = catalog.components.filter((component) => component.kind === "vendor").length;
|
||||
catalog.counts.native = catalog.components.filter((component) => component.kind === "native").length;
|
||||
|
||||
Reference in new issue
Block a user