Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0046-arcactl FR-002
The configuration of arcactl and the models it knows (commons data 0046-arcactl FR-002): arca.config.ts is a TypeScript file that default-exports defineArca({...}), so the compiler checks it, and holds no secret. The arca family is the party model, the tenancy model and the identity models; the issues model is available to it but is not of the family. A project names the models it wants and the modules they require come with them.
Source: commons/data/sql/cli/config.ts
3 of 8 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
Arcainterfaceno test imports itinterface Arca
The configuration with every default filled.
| Member | Type | What it is |
|---|
schema | string | |
models | readonly ("arcaParty" | "arcaTenancy" | "contract" | "flow" | "identity" | "identityAbac" | "identityAccess" | "identityAgent" | "identityDelegation" | "identityDevice" | "identityMachine" | "identityPki" | "identityRebac" | "issues" | "meaning" | "operations" | "proof")[] | |
invariants | boolean | |
guard | boolean | |
seal | boolean | |
unmanaged | "drop" | "hold" | |
ledgerTable | string | |
ArcaConfiginterfaceno test imports itinterface ArcaConfig
What a project says of its arca database.
| Member | Type | What it is |
|---|
schema? | string | The schema the tables are in; arca by default. |
models | readonly ("arcaParty" | "arcaTenancy" | "contract" | "flow" | "identity" | "identityAbac" | "identityAccess" | "identityAgent" | "identityDelegation" | "identityDevice" | "identityMachine" | "identityPki" | "identityRebac" | "issues" | "meaning" | "operations" | "proof")[] | The models wanted, by name; what they require comes with them. |
invariants? | boolean | Whether the invariants are in the database (append-only, chains, status moves); on by default. |
guard? | boolean | Whether the guard against weakening them is expected (PostgreSQL's event triggers); on by default. |
seal? | boolean | Whether the scope of row security is sealed (accessSource({ seal })); off by default. |
unmanaged? | "drop" | "hold" | What to do with what is in the database and not in the model. |
ledgerTable? | string | The ledger's table; lifecycle_ledger by default. |
const allModules: () => readonly Module[]
Every model of the family, as a module.
Imported by 47 tests of the run (47 passed, 0 failed): the library's results
ConfigErrortypeno test imports ittype ConfigError = { readonly kind: "model"; readonly name: string } | { readonly kind: "schema"; readonly name: string } | { readonly kind: "compose"; readonly errors: readonly ComposeError[] } | { readonly kind: "project"; readonly why: string };
What is wrong with a configuration.
const defineArca: (config: ArcaConfig) => ArcaConfig
The configuration, as the compiler checks it.
Imported by 51 tests of the run (51 passed, 0 failed): the library's results
loadConfigfunctionno test imports itfunction loadConfig(path: string): Promise<Result<ArcaConfig, string>>
Reads arca.config.ts: the file's default export, which defineArca made.
ModelNametypeno test imports ittype ModelName = (typeof modelNames)[number];
The name of a model that a configuration may ask for.
const modelNames: readonly ["arcaParty", "arcaTenancy", "identity", "identityAccess", "identityAbac", "identityRebac", "identityPki", "identityMachine", "identityDevice", "identityDelegation", "identityAgent", "issues", "flow", "meaning", "contract", "operations", "proof"]
The models of the arca family, and the issues model.
Imported by 8 tests of the run (8 passed, 0 failed): the library's results