tcmts.store

test/
13 definitions

Types

Causal type
A point in history: a namespace state, the causals it was made from, and (not hashed) what made it, when, and what for, if it was told (`message`).
Comment type
Contribution type
A branch proposed for merging into another.
LogEntry type
NameRow type
NamespaceBody type
A namespace node: `["ns", [[name, [hashes]]...], [[child, nodeHash]...]]`, both lists sorted by name. Where a name shows a definition with other text than it was first stored with (its comments, layout or doc changed), a fourth list says which version: `[[name, hash, textHash]...]`, sorted by name and hash. A node without one is written, and hashed, as before there were text versions.
Release type
A package's version: an immutable name for a history entry, with its release notes (markdown).
Row type
Store typeof Store
TestResult type
TextVersion type
How a definition reads: its code as written (comments, layout, names spelled as then) and its doc. None of it is in its hash, so one definition can have several; each is kept by its textHash.

Server

EMPTY_NAMESPACE string
The empty namespace, and the causal every history starts from: the same in every codebase.
LAYOUT string
The codebase's table layout, as a fingerprint of its schema: a codebase records the one it was made with.
ROOT_CAUSAL string
causalHash (namespace: string, parents: string[]) => string
A causal's hash: its namespace and its parents (in order of hash), nothing else.
hash32 (domain: string, text: string) => string
namespaceHash (body: string) => string
The hash of a namespace node's body.
stateHashOf (rows: { path: string; hash: string; }[]) => string
textHash (v: TextVersion) => string
A text version's hash: its text and its doc (where the doc names definitions follows from those, and the names).

Shared

B32 "abcdefghijklmnopqrstuvwxyz234567"
DEF_CACHE 5000
How many definitions a store keeps read in memory (`Store.getDef`), the most recently read.
EMPTY_BODY string
SCHEMA "\nCREATE TABLE IF NOT EXISTS components (hash TEXT PRIMARY KEY, size INTEGER NOT NULL, ir_version …
cleanMessage (message: string | undefined) => string | undefined
A message as given (`-m`, a tool's `message`): line endings as `\n`, trailing spaces and blank lines at either end taken off. Nothing left is no message.
contributionOf (r: Row) => Contribution
deepFreeze <T>(value: T) => T
Freeze a value and everything in it.
entryText (command: string, message?: string | undefined) => string
How a history entry's `command` column holds what made it: the label of the command (`update lib.f`), then, after a line break, the message it was given (`-m`), if any. One column, so the message goes wherever the entry does (a push, a pull, a migration), with any tcm; it's in no hash, so it can change without changing history.
entryTitle (c: { command: string; message?: string | undefined; }) => string
What a history entry is called: its message's first line, or else the label of the command that made it.
jsxOf (ir: string) => { jsx?: string | undefined; }
The JSX runtime a definition compiles to: part of its IR (and so its hash), read from there.
readEntryText (text: string) => { command: string; message?: string | undefined; }
entryText read back: the command's label, and the message, if there is one.
renamedSignature (signature: string, renames: ReadonlyMap<string, string>) => string
A signature with other names for what it names: `renames` maps the name a definition was made as (how a signature prints it) to the name to show. Only types and values are renamed, not property or parameter names (`{ Foo: Foo }` keeps its key), a qualified name's members, or what's in a string literal type.

Files

package file