IF Commons GitHub

sql/extensions/history/manifest

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0018-sql-history FR-002

The manifest of a history (commons data 0018-sql-history FR-002): the files in order, each with the hash of its text and a chain hash of the entry before it. A file that is changed, taken out, put in or moved breaks the chain, and a file whose identifier no longer matches what it holds is found even where its manifest entry was edited to match.

Source: commons/data/sql/extensions/history/manifest.ts

1 of 5 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

checkHistoryfunction
function checkHistory(files: readonly Artifact[], folder: string): { readonly manifest: Manifest | undefined; readonly problems: readonly Problem[]; }

Whether a history holds together.

ParameterWhat it is
filesthe files of the history, by path
folderthe folder the history is in

Returns: the manifest and what is wrong with the history

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

Manifestinterfaceno test imports it
interface Manifest

The manifest.

MemberTypeWhat it is
format1
dialectstring
basestringThe state the history starts from.
entriesreadonly ManifestEntry[]
ManifestEntryinterfaceno test imports it
interface ManifestEntry

One entry of the manifest.

MemberTypeWhat it is
numbernumber
filestring
idstring
fromstring
tostring
sha256stringThe SHA-256 of the file's text.
chainstring
Problemtypeno test imports it
type Problem = | { readonly kind: "manifest"; readonly why: string } | { readonly kind: "missing"; readonly file: st… (432 characters)
type Problem =
  | { readonly kind: "manifest"; readonly why: string }
  | { readonly kind: "missing"; readonly file: string }
  | { readonly kind: "edited"; readonly file: string }
  | { readonly kind: "identity"; readonly file: string }
  | { readonly kind: "chain"; readonly number: number }
  | { readonly kind: "order"; readonly number: number }
  | { readonly kind: "unreadable"; readonly file: string; readonly why: string };

What is wrong with a history.

renderManifestconstno test imports it
const renderManifest: (m: Manifest) => string

The manifest as text.

Titles, headings, exports, tables, columns and requirements. Esc closes.