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.
function checkHistory(files: readonly Artifact[], folder: string): { readonly manifest: Manifest | undefined; readonly problems: readonly Problem[]; }
Whether a history holds together.
| Parameter | What it is |
|---|
files | the files of the history, by path |
folder | the 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 itinterface Manifest
The manifest.
| Member | Type | What it is |
|---|
format | 1 | |
dialect | string | |
base | string | The state the history starts from. |
entries | readonly ManifestEntry[] | |
ManifestEntryinterfaceno test imports itinterface ManifestEntry
One entry of the manifest.
| Member | Type | What it is |
|---|
number | number | |
file | string | |
id | string | |
from | string | |
to | string | |
sha256 | string | The SHA-256 of the file's text. |
chain | string | |
Problemtypeno test imports ittype 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 itconst renderManifest: (m: Manifest) => string