GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — UnitKeeperBot/aact.config.ts at main · ilyascw/UnitKeeperBot Expand file tree/ Copy pathaact.config.tsMore file actions 38 lines (34 loc) · 1.31 KB / Copy pathaact.config.tsFile metadata and controls38 lines (34 loc) · 1.31 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 import type { AactConfig, RuleDefinition } from "aact"; const databaseAccessRule: RuleDefinition = { name: "databaseAccess", description: "Only backend, scheduler and migrations may access PostgreSQL", rationale: "The Mini App and bot must use backend HTTP contracts. The backend, its scheduler process and the one-shot migration process are the only database clients.", check(model) { const databaseNames = new Set( Object.values(model.elements) .filter((element) => element.kind === "ContainerDb") .map((element) => element.name), ); const allowedClients = new Set(["backend", "scheduler", "migrate"]); return Object.values(model.elements).flatMap((element) => element.relations .filter((relation) => databaseNames.has(relation.to) && !allowedClients.has(element.name)) .map((relation) => ({ target: element.name, targetKind: "element" as const, message: `${element.label} must use the backend API instead of accessing ${relation.to}`, ...(relation.sourceLocation ? { sourceLocation: relation.sourceLocation } : {}), })), ); }, }; const config: AactConfig = { source: "./architecture.dsl", customRules: [databaseAccessRule], rules: { acyclic: true, acl: true, }, }; export default config; |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |