logical.Answeredtypeno test imports ittype Answered = { readonly columns: readonly string[]; readonly rows: readonly (readonly unknown[])[] } | { readonly error: string };The answer to a question asked of the estate.
The scope of an engagement: the assets its two questions select. The questions are asked of the estate by the caller (this library asks nothing and reaches nothing); what is given back is checked here: each answer must have a column named asset, and what is left out is taken from what is included. An empty scope is a problem, because a test of nothing is not authorized, and so is an asset in scope that the estate does not have.
import { resolveScope } from "./scope.ts";
resolveScope({ include: "select id as asset from asset" }, () => ({ columns: ["asset"], rows: [["athens"]] }), ["athens"]).inScope; // ["athens"]logical.Answeredtypeno test imports ittype Answered = { readonly columns: readonly string[]; readonly rows: readonly (readonly unknown[])[] } | { readonly error: string };The answer to a question asked of the estate.
logical.Scopetypeno test imports ittype Scope = { readonly inScope: readonly string[]; readonly excluded: readonly string[]; readonly problems: readonly string[] };The scope of an engagement.
logical.resolveScopefunctionno test imports itfunction resolveScope(scope: Pick<{ readonly include: string; readonly exclude?: string | undefined; }, "exclude" | "include">, ask: (sql: string) => Answered, known: readonly string[]): ScopeThe assets in scope, from the two questions of the engagement asked through ask; known are the assets the estate has.
Answeredtypetype Answered = { readonly columns: readonly string[]; readonly rows: readonly (readonly unknown[])[] } | { readonly error: string };The answer to a question asked of the estate.
Scopetypeno test imports ittype Scope = { readonly inScope: readonly string[]; readonly excluded: readonly string[]; readonly problems: readonly string[] };The scope of an engagement.
resolveScopefunctionfunction resolveScope(scope: Pick<{ readonly include: string; readonly exclude?: string | undefined; }, "exclude" | "include">, ask: (sql: string) => Answered, known: readonly string[]): ScopeThe assets in scope, from the two questions of the engagement asked through ask; known are the assets the estate has.